EndpointAddress10.ToEndpointAddress Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Recupera l'indirizzo endpoint contenuto nel tipo serializzabile.
public:
System::ServiceModel::EndpointAddress ^ ToEndpointAddress();
public System.ServiceModel.EndpointAddress ToEndpointAddress ();
member this.ToEndpointAddress : unit -> System.ServiceModel.EndpointAddress
Public Function ToEndpointAddress () As EndpointAddress
Restituisce
Classe EndpointAddress utilizzata per inizializzare l'istanza di questa classe.
Esempio
In questo esempio viene illustrato come convertire EndpointAddress10
in 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()