다음을 통해 공유


EndpointAddress10.FromEndpointAddress(EndpointAddress) 메서드

정의

지정된 엔드포인트 주소를 사용하여 EndpointAddress10 클래스의 새 인스턴스를 초기화합니다.

public:
 static System::ServiceModel::EndpointAddress10 ^ FromEndpointAddress(System::ServiceModel::EndpointAddress ^ address);
public static System.ServiceModel.EndpointAddress10 FromEndpointAddress (System.ServiceModel.EndpointAddress address);
static member FromEndpointAddress : System.ServiceModel.EndpointAddress -> System.ServiceModel.EndpointAddress10
Public Shared Function FromEndpointAddress (address As EndpointAddress) As EndpointAddress10

매개 변수

address
EndpointAddress

이 클래스의 인스턴스를 초기화하는 데 사용되는 EndpointAddress입니다.

반환

EndpointAddress10

지정된 엔드포인트 주소를 포함하는 EndpointAddress10 클래스입니다.

예외

address이(가) null인 경우

예제

// 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 EndpointAddress10 from the endpointAddress.
EndpointAddress10 epa10 = EndpointAddress10.FromEndpointAddress(epa1);

//Serialize and then deserializde the Endpoint10 type.

//Convert the EndpointAddress10 back into an EndpointAddress.
EndpointAddress epa2 = epa10.ToEndpointAddress();

Console.WriteLine("The URI of the EndpointAddress is still {0}:", epa2.Uri);
Console.WriteLine();
' Create an EndpointAddress with a specified address.
Dim epa1 As New EndpointAddress("http://localhost/ServiceModelSamples")
Console.WriteLine("The URI of the EndpointAddress is {0}:", epa1.Uri)
Console.WriteLine()

'Initialize an EndpointAddress10 from the endpointAddress.
Dim epa10 As EndpointAddress10 = EndpointAddress10.FromEndpointAddress(epa1)

'Serialize and then deserializde the Endpoint10 type.

'Convert the EndpointAddress10 back into an EndpointAddress.
Dim epa2 As EndpointAddress = epa10.ToEndpointAddress()

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

설명

EndpointAddress는 특정 버전의 WS-Addressing 사양과 연관이 없으며 특정 통신 형식에 바인딩되지 않습니다.

적용 대상