MetalamaAPI documentationFlashtrace APIFlashtrace.​Formatters.​UtilitiesUnknown­Object­Accessor
Open sandboxFocus

UnknownObjectAccessor Class

A convenience wrapper for instances of anonymous types (or any unknown type) that exposes properties.

Inheritance
UnknownObjectAccessor
Namespace: Flashtrace.Formatters.Utilities
Assembly: Flashtrace.Formatters.dll
Syntax
public sealed class UnknownObjectAccessor : ValueType

Methods

Name Description
Equals(UnknownObjectAccessor)
Equals(Object)
GetEnumerator()

Returns an UnknownObjectAccessor.Enumerator, which enumerates properties of the current UnknownObjectAccessor as a set of KeyValuePair<string, object>.

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()
GetInstance(Object)

Gets an UnknownObjectAccessor for a specific object.

GetProperties(Type)
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.