Class UnknownObjectAccessor
A convenience wrapper for instances of anonymous types (or any unknown type) that exposes properties.
Namespace: PostSharp.Patterns.Utilities
Assembly: PostSharp.Patterns.Common.dll
Syntax
public sealed class UnknownObjectAccessor : ValueType
Methods
Name | Description |
---|---|
Equals(UnknownObjectAccessor) | Indicates whether the current object is equal to another object of the same type. |
Equals(Object) | Indicates whether this instance and a specified object are equal. |
GetEnumerator() | Returns an UnknownObjectAccessor.Enumerator, which enumerates properties of the current UnknownObjectAccessor
as a set of |
GetFactory(Type) | Gets a delegate to a factory method that returns a UnknownObjectAccessor for an object of a type given as a generic parameter. |
GetFactory<T>() | Gets a delegate to a factory method that returns a UnknownObjectAccessor for an object of a type given as a generic parameter. |
GetHashCode() | Returns the hash code for this instance. |
GetInstance(Object) | Gets an UnknownObjectAccessor for a specific object. |
ToTuples() | Converts the wrapped object to an array of name-value tuples. |
TryGetProperty<T>(Object, String, out T) | Gets the value of a named property for an arbitrary object. |
TryGetProperty<T>(String, out T) | Gets the value of a named property for the current UnknownObjectAccessor. |
VisitProperties<TState>(IUnknownObjectPropertyVisitor<TState>, ref TState) | Invokes the Visit<TValue>(String, TValue, ref TState) method of a given visitor for each property of the current UnknownObjectAccessor. |
Operators
Name | Description |
---|---|
Equality(UnknownObjectAccessor, UnknownObjectAccessor) | Determines if two UnknownObjectAccessor are equal. |
Inequality(UnknownObjectAccessor, UnknownObjectAccessor) | Determines if two UnknownObjectAccessor are different. |