Show / Hide Table of Contents

Class ContentsDecorationContext<T>

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

Inheritance
System.Object
ContentsDecorationContext<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 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.

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