Export (0) Print
Expand All

AddressHeader.GetValue<T> Method (XmlObjectSerializer)

Deserializes the information item from the current address header to an object of a specified type that uses a specified formatter to serialize this information.

Namespace:  System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public T GetValue<T>(
	XmlObjectSerializer serializer
)

Type Parameters

T

A class of type T with its fields and properties set to the values supplied by the current address header object.

Parameters

serializer
Type: System.Runtime.Serialization.XmlObjectSerializer
The XmlObjectSerializer used to deserialize the information item from the current address header object.

Return Value

Type: T
An instance of a class of type T with its fields and properties set to the values supplied by the current address header object.

ExceptionCondition
ArgumentNullException

The serializer is null.

When using this overload, you must supply a type for the generic parameter T. The type of the return value is determined by the generic type parameter.

Use this overload only if you want to use a customized XML formatter; otherwise use the GetValue<T>() overload.

The following example shows how to call this method.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft