Show / Hide Table of Contents

Class ReferencedDeserializationContext<T>

Establishes a context for referenced (or targeted) deserialization whereby an existing instance is provided to assign values into, rather than the default behavior of activating a new instance where the values are assigned.

Inheritance
System.Object
ReferencedDeserializationContext<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 ReferencedDeserializationContext<T>
    where T : class
Type Parameters
T

The type under configuration.

Constructors

ReferencedDeserializationContext(IExtendedXmlSerializer, T)

Creates a new instance.

Declaration
public ReferencedDeserializationContext(IExtendedXmlSerializer this, T existing)
Parameters
IExtendedXmlSerializer this

The serializer to configure.

T existing

The existing target instance.

ReferencedDeserializationContext(IExtendedXmlSerializer, T, XmlReaderSettings)

Creates a new instance.

Declaration
public ReferencedDeserializationContext(IExtendedXmlSerializer serializer, T existing, XmlReaderSettings settings)
Parameters
IExtendedXmlSerializer serializer

The serializer to configure.

T existing

The existing target instance.

System.Xml.XmlReaderSettings settings

The xml reader settings used for deserialization.

Methods

Deserialize(Stream)

Deserializes a document represented by the provided stream and assigns any values into the provided instance context.

Declaration
public T Deserialize(Stream stream)
Parameters
System.IO.Stream stream

The stream representing the source document.

Returns
T

The initial provided target instance, assigned with values discovered in the provided document.

Deserialize(String)

Deserializes a document represented by the provided text and assigns any values into the provided instance context.

Declaration
public T Deserialize(string data)
Parameters
System.String data

Text that represents an Xml document.

Returns
T

The initial provided target instance, assigned with values discovered in the provided document.

Deserialize(XmlReader)

Deserializes a document represented by the provided stream and assigns any values into the provided instance context, using the provided reader settings.

Declaration
public T Deserialize(XmlReader reader)
Parameters
System.Xml.XmlReader reader

The reader representing the source document.

Returns
T

The initial provided target instance, assigned with values discovered in the provided document.

Deserialize(XmlReaderSettings, Stream)

Deserializes a document represented by the provided stream and assigns any values into the provided instance context, using the provided reader settings.

Declaration
public T Deserialize(XmlReaderSettings settings, Stream stream)
Parameters
System.Xml.XmlReaderSettings settings

The xml reader settings to apply during document processing.

System.IO.Stream stream

The stream representing the source document.

Returns
T

The initial provided target instance, assigned with values discovered in the provided document.

Deserialize(XmlReaderSettings, String)

Deserializes a document represented by the provided text and assigns any values into the provided instance context, using the provided reader settings.

Declaration
public T Deserialize(XmlReaderSettings settings, string data)
Parameters
System.Xml.XmlReaderSettings settings

The xml reader settings to apply during document processing.

System.String data

Text that represents an Xml document.

Returns
T

The initial provided target instance, assigned with values discovered in the provided document.

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)

See Also

UsingTarget<T>(IExtendedXmlSerializer, T)
Back to top Generated by DocFX