AddressHeader.GetValue<T> Method (XmlObjectSerializer)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Function GetValue(Of T) ( _
    serializer As XmlObjectSerializer _
) As T
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

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.

Exceptions

Exception Condition
ArgumentNullException

The serializer is nulla null reference (Nothing in Visual Basic).

Remarks

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.

Examples

The following example shows how to call this method.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.