PostSharpAPI ReferencePost­Sharp.​Patterns.​UtilitiesUnknown­Object­AccessorGet­Factory
Open sandboxFocus

UnknownObjectAccessor.GetFactory Method

GetFactory<T>()

Gets a delegate to a factory method that returns a UnknownObjectAccessor for an object of a type given as a generic parameter.

Declaration
public static Func<T, UnknownObjectAccessor> GetFactory<T>()
Returns
Type Description
System.Func<T, UnknownObjectAccessor>

A delegate that takes the object as input and returns its UnknownObjectAccessor.

Type Parameters
Name Description
T

Type of the objects to be wrapped. It must be the final type (cannot be object, for instance).

GetFactory(Type)

Gets a delegate to a factory method that returns a UnknownObjectAccessor for an object of a type given as a generic parameter.

Declaration
public static Func<object, UnknownObjectAccessor> GetFactory(Type type)
Parameters
Type Name Description
System.Type type

Type of the objects to be wrapped. It must be the final type (cannot be object, for instance).

Returns
Type Description
System.Func<Object, UnknownObjectAccessor>

A delegate that takes the object as input and returns its UnknownObjectAccessor.