PostSharpAPI ReferencePost­Sharp.​Patterns.​Model.​Type­AdaptersRegister­Type­Adapter­AttributeRegister­Type­Adapter­Attribute
Open sandboxFocus

RegisterTypeAdapterAttribute Constructor

RegisterTypeAdapterAttribute(String, Type)

Initializes a new RegisterFieldRuleAttribute and specifies the name of the target type. Use this constructor when the target type is not in the current assembly or in an assembly referenced by the current assembly.

Declaration
public RegisterTypeAdapterAttribute(string targetTypeName, Type typeAdapterFactoryType)
Parameters
Type Name Description
System.String targetTypeName

The name of the target type (equal to the FullName property of the target System.Type).

System.Type typeAdapterFactoryType

A System.Type derived from TypeAdapterFactory. The type must have a public default constructor.

RegisterTypeAdapterAttribute(Type, Type)

Initializes a new RegisterFieldRuleAttribute and specifies the name of the target type.

Declaration
public RegisterTypeAdapterAttribute(Type targetType, Type typeAdapterFactoryType)
Parameters
Type Name Description
System.Type targetType

The target System.Type.

System.Type typeAdapterFactoryType

A System.Type derived from TypeAdapterFactory. The type must have a public default constructor.