Show / Hide Table of Contents

Class TypeConverterRegistrationContext<T>

Establishes context that enables converter registration operations to be performed on the subject type configuration.

Inheritance
System.Object
TypeConverterRegistrationContext<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 TypeConverterRegistrationContext<T>
Type Parameters
T

Constructors

TypeConverterRegistrationContext(ITypeConfiguration<T>)

Creates a new instance.

Declaration
public TypeConverterRegistrationContext(ITypeConfiguration<T> configuration)
Parameters
ITypeConfiguration<T> configuration

The type configuration under configuration.

Methods

ByCalling(Func<T, String>, Func<String, T>)

Registers a converter for the provided type. This defines how to deconstruct an instance of the currently configured type into a string for serialization, and to construct an instance of the currently configured type from a string during deserialization.

Declaration
public ITypeConfiguration<T> ByCalling(Func<T, string> format, Func<string, T> parse)
Parameters
System.Func<T, System.String> format

The formatter to use during serialization.

System.Func<System.String, T> parse

The parser to use during deserialization.

Returns
ITypeConfiguration<T>

The configured type container.

None()

Removes all registered converters that work with the currently configured type.

Declaration
public ITypeConfiguration<T> None()
Returns
ITypeConfiguration<T>

The configured type configuration.

Using(IConverter<T>)

Registers a converter for the provided type. This defines how to deconstruct an instance of the currently configured type into a string for serialization, and to construct an instance of the currently configured type from a string during deserialization.

Declaration
public ITypeConfiguration<T> Using(IConverter<T> converter)
Parameters
IConverter<T> converter

The converter to register.

Returns
ITypeConfiguration<T>

The configured type container.

Without(IConverter)

Removes the registration (if any) from the container's converter registration.

Declaration
public ITypeConfiguration<T> Without(IConverter converter)
Parameters
IConverter converter

The converter to remove from registration.

Returns
ITypeConfiguration<T>

The configured type container.

Without(IConverter<T>)

Removes the registration (if any) from the container's converter registration.

Declaration
public ITypeConfiguration<T> Without(IConverter<T> converter)
Parameters
IConverter<T> converter

The converter to remove from registration.

Returns
ITypeConfiguration<T>

The configured type container.

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