Show / Hide Table of Contents

Class ElementDecorationContext<T>

Used to establish a fluent context for decorating the IElement component when configuring the configuration container.

Inheritance
System.Object
ElementDecorationContext<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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.

Extension Methods

ExtensionMethods.Return<T, TOut>(T, TOut)
ExtensionMethods.To<T>(Object)
ExtensionMethods.AsValid<T>(Object, String)
ExtensionMethodsForAttachedProperties.Get<TType, TValue>(TType, Property<TType, TValue>)
ExtensionMethodsForAttachedProperties.Set<TType, TValue>(TType, Property<TType, TValue>, TValue)
ExtensionMethodsForCoreSources.If<TParameter, TResult>(TResult, ISpecification<TParameter>)
ExtensionMethodsForCoreSources.Let<TSpecification, TInstance>(TInstance, ISpecification<TSpecification>, TInstance)
Back to top Generated by DocFX