EndpointAddress10.ToEndpointAddress 메서드

정의

이 직렬화 가능한 형식에 포함된 엔드포인트 주소를 검색합니다.

public:
 System::ServiceModel::EndpointAddress ^ ToEndpointAddress();
public System.ServiceModel.EndpointAddress ToEndpointAddress();
member this.ToEndpointAddress : unit -> System.ServiceModel.EndpointAddress
Public Function ToEndpointAddress () As EndpointAddress

반품

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

예제

이 예제에서는 .로 변환하는 EndpointAddress10 방법을 보여 주는 예제입니다 EndpointAddress.

// 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()

적용 대상