Class TypeSerializerComposerRegistrationContext<T>
Provides a context for registering content composers for a particular type.
Inheritance
Inherited Members
Namespace: ExtendedXmlSerializer.Configuration
Assembly: ExtendedXmlSerializer.dll
Syntax
public sealed class TypeSerializerComposerRegistrationContext<T>
Type Parameters
T
The type under configuration. |
Constructors
TypeSerializerComposerRegistrationContext(ITypeConfiguration<T>)
Creates a new instance.
Declaration
public TypeSerializerComposerRegistrationContext(ITypeConfiguration<T> configuration)
Parameters
ITypeConfiguration<T>
configuration
|
Methods
ByCalling(Func<ISerializer, ISerializer>)
Used to alter a serializer whenever one is created for a specific type. This allows the scenario of decorating a serializer to override or monitor serialization and/or deserialization. This override accepts a generalized serializer delegate.
Declaration
public ITypeConfiguration<T> ByCalling(Func<ISerializer, ISerializer> compose)
Parameters
System.Func<ISerializer, ISerializer>
compose
The delegate that defines how to create a content serializer. |
Returns
ITypeConfiguration<T>
The configured type configuration. |
See Also
ByCalling(Func<ISerializer<T>, ISerializer<T>>)
Used to alter a serializer whenever one is created for a specific type. This allows the scenario of decorating a serializer to override or monitor serialization and/or deserialization.
Declaration
public ITypeConfiguration<T> ByCalling(Func<ISerializer<T>, ISerializer<T>> compose)
Parameters
System.Func<ISerializer<T>, ISerializer<T>>
compose
The delegate that defines how to create a content serializer. |
Returns
ITypeConfiguration<T>
The configured type configuration. |
See Also
None()
Clears any registered content serializer composers for the type under configuration.
Declaration
public ITypeConfiguration<T> None()
Returns
ITypeConfiguration<T>
The configured type configuration. |
See Also
Of(Type)
Registers a content serializer composer of the specified type.
Declaration
public ITypeConfiguration<T> Of(Type composerType)
Parameters
System.Type
composerType
The type that implements ISerializerComposer of the content composer to register. |
Returns
ITypeConfiguration<T>
The configured type configuration. |
See Also
Of<TComposer>()
Registers a content serializer composer of the specified type.
Declaration
public ITypeConfiguration<T> Of<TComposer>()
where TComposer : ISerializerComposer<T>
Returns
ITypeConfiguration<T>
The configured type configuration. |
Type Parameters
TComposer
The type of the content composer to register. |
See Also
Using(ISerializerComposer)
Used to alter a serializer whenever one is created for a specific type. This allows the scenario of decorating a serializer to override or monitor serialization and/or deserialization. This override accepts an ISerializerComposer that performs the alteration on the created serializer.
Declaration
public ITypeConfiguration<T> Using(ISerializerComposer composer)
Parameters
ISerializerComposer
composer
The serializer composer to register. |
Returns
ITypeConfiguration<T>
The configured type configuration. |