This documentation is archived and is not being maintained.

EndpointAddressAugust2004.FromEndpointAddress Method

Initializes a new instance of the EndpointAddress10 class with a specified endpoint address.

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

public static EndpointAddressAugust2004 FromEndpointAddress(
	EndpointAddress address
)

Parameters

address
Type: System.ServiceModel.EndpointAddress

The EndpointAddress used to initialize the instance of this class.

Return Value

Type: System.ServiceModel.EndpointAddressAugust2004
The EndpointAddressAugust2004 class that contains the specified endpoint address.

The EndpointAddress is not tied to a particular version of the WS-Addressing specification or bound to a particular wire format.

// Create an EndpointAddress with a specified address.
EndpointAddress epa1 = new EndpointAddress("http://localhost/ServiceModelSamples");
Console.WriteLine("The URI of the EndpointAddress is {0}:", epa1.Uri);
Console.WriteLine();

//Initialize an EndpointAddressAugust2004 from the endpointAddress.
EndpointAddressAugust2004 epaA4 = EndpointAddressAugust2004.FromEndpointAddress(epa1);

//Serialize and then deserializde the EndpointAugust2004 type. 

//Convert the EndpointAugust2004 back into an EndpointAddress.
EndpointAddress epa2 = epaA4.ToEndpointAddress();

Console.WriteLine("The URI of the EndpointAddress is still {0}:", epa2.Uri);
Console.WriteLine();

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5, 3.0
Show: