Class ElementDecorationContext<T>
Used to establish a fluent context for decorating the IElement component when configuring the configuration container.
Inheritance
Inherited Members
Namespace: ExtendedXmlSerializer.Configuration
Assembly: ExtendedXmlSerializer.dll
Syntax
public sealed class ElementDecorationContext<T>
where T : IElement
Type Parameters
T
The decorating type of type IElement with which to establish the context. |
Constructors
ElementDecorationContext(IServiceRepository)
Creates a new instance.
Declaration
public ElementDecorationContext(IServiceRepository repository)
Parameters
IServiceRepository
repository
The repository to configure. |
Methods
When(ISpecification<TypeInfo>)
Configures the container's IElement to use the decorated 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 IElement to use. When this specification evaluates to true, the currently configured context type will be used. Otherwise, the previous IElement will be utilized instead. |
Returns
IServiceRepository
The configured repository. |
When<TSpecification>()
Configures the container's IElement to use the decorated 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 type of specification to activate via service location. |