Class ContentsDecorationContext<T>
Used to establish a fluent context for decorating the IContents component when configuring the configuration container.
Inheritance
Inherited Members
Namespace: ExtendedXmlSerializer.Configuration
Assembly: ExtendedXmlSerializer.dll
Syntax
public sealed class ContentsDecorationContext<T>
where T : IContents
Type Parameters
T
The IContents type. |
Constructors
ContentsDecorationContext(IServiceRepository)
Creates a new instance.
Declaration
public ContentsDecorationContext(IServiceRepository repository)
Parameters
IServiceRepository
repository
The service repository to configure. |
Methods
Then()
Decorates IContents with the currently configured context type and returns the configured service repository.
Declaration
public IServiceRepository Then()
Returns
IServiceRepository
The configured repository. |
When(ISpecification<TypeInfo>)
Configures the IContents to use the configured context type when the provided specification is satisfied.
Declaration
public IServiceRepository When(ISpecification<TypeInfo> specification)
Parameters
ISpecification<System.Reflection.TypeInfo>
specification
The specification to use for determining which IContents to use. When this specification evaluates to true, the currently configured context type will be used. Otherwise, the previous IContents will be utilized instead. |
Returns
IServiceRepository
The configured repository. |
When(Func<TypeInfo, Boolean>)
Configures the IContents to use the configured context type when the provided specification delegate is satisfied.
Declaration
public IServiceRepository When(Func<TypeInfo, bool> specification)
Parameters
System.Func<System.Reflection.TypeInfo, System.Boolean>
specification
The delegate to use for determining which IContents to use. When this delegate evaluates to true, the currently configured context type will be used. Otherwise, the previous IContents will be utilized instead. |
Returns
IServiceRepository
The configured repository. |
When<TSpecification>()
Configures the IContents to use the configured context type when the provided specification is satisfied.
Declaration
public IServiceRepository When<TSpecification>()
where TSpecification : ISpecification<TypeInfo>
Returns
IServiceRepository
The configured repository. |
Type Parameters
TSpecification
The specification to use for determining which IContents to use. When this specification evaluates to true, the currently configured context type will be used. Otherwise, the previous IContents will be utilized instead. |