PostSharpAPI ReferencePost­Sharp.​Patterns.​FormattersFormatter­Repository<TRole>Register
Open sandboxFocus

Method Register

Register<T>(IFormatter<T>)

Registers the given formatter for the type T.

Declaration
public static void Register<T>(IFormatter<T> formatter)
Parameters
Type Name Description
IFormatter<T> formatter
Type Parameters
Name Description
T

Register(Type, IFormatter)

Registers the given formatter for the given targetType.

Declaration
public static void Register(Type targetType, IFormatter formatter)
Parameters
Type Name Description
Type targetType
IFormatter formatter

Register(Type, Type)

Registers the given formatterType for the given targetType.

Declaration
public static void Register(Type targetType, Type formatterType)
Parameters
Type Name Description
Type targetType
Type formatterType