Condividi tramite


EndpointAddress.WriteTo Metodo

Definizione

Salva l'indirizzo endpoint corrente di una versione specificata in un writer XML o in un writer di dizionario XML.

Overload

WriteTo(AddressingVersion, XmlDictionaryWriter)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer di dizionario XML specificato.

WriteTo(AddressingVersion, XmlWriter)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer XML specificato.

WriteTo(AddressingVersion, XmlDictionaryWriter, XmlDictionaryString, XmlDictionaryString)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer di dizionario XML con uno spazio dei nomi e un nome locale specificati.

WriteTo(AddressingVersion, XmlWriter, String, String)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer XML con uno spazio dei nomi e un nome locale specificati.

WriteTo(AddressingVersion, XmlDictionaryWriter)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer di dizionario XML specificato.

public:
 void WriteTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlDictionaryWriter ^ writer);
public void WriteTo (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryWriter writer);
member this.WriteTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlDictionaryWriter -> unit
Public Sub WriteTo (addressingVersion As AddressingVersion, writer As XmlDictionaryWriter)

Parametri

addressingVersion
AddressingVersion

Oggetto AddressingVersion dell'indirizzo endpoint corrente.

writer
XmlDictionaryWriter

Oggetto XmlDictionaryWriter in cui viene salvato l'indirizzo endpoint.

Eccezioni

writer o addressingVersion è null.

Esempio

XmlWriter writer = XmlWriter.Create("addressdata.xml");
XmlDictionaryWriter dictWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer);
endpointAddress.WriteTo(
            AddressingVersion.WSAddressing10,
            dictWriter);
writer.Close();

Si applica a

WriteTo(AddressingVersion, XmlWriter)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer XML specificato.

public:
 void WriteTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlWriter ^ writer);
public void WriteTo (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlWriter writer);
member this.WriteTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlWriter -> unit
Public Sub WriteTo (addressingVersion As AddressingVersion, writer As XmlWriter)

Parametri

addressingVersion
AddressingVersion

Oggetto AddressingVersion dell'indirizzo endpoint corrente.

writer
XmlWriter

Oggetto XmlWriter in cui viene salvato l'indirizzo endpoint.

Eccezioni

writer o addressingVersion è null.

Esempio

XmlWriter writer = XmlWriter.Create("addressdata.xml");
endpointAddress.WriteTo(
            AddressingVersion.WSAddressing10,
            writer);
writer.Close();

Si applica a

WriteTo(AddressingVersion, XmlDictionaryWriter, XmlDictionaryString, XmlDictionaryString)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer di dizionario XML con uno spazio dei nomi e un nome locale specificati.

public:
 void WriteTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlDictionaryWriter ^ writer, System::Xml::XmlDictionaryString ^ localName, System::Xml::XmlDictionaryString ^ ns);
public:
 void WriteTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlDictionaryWriter ^ writer, System::Xml::XmlDictionaryString ^ localname, System::Xml::XmlDictionaryString ^ ns);
public void WriteTo (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryWriter writer, System.Xml.XmlDictionaryString localName, System.Xml.XmlDictionaryString ns);
public void WriteTo (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryWriter writer, System.Xml.XmlDictionaryString localname, System.Xml.XmlDictionaryString ns);
member this.WriteTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlDictionaryWriter * System.Xml.XmlDictionaryString * System.Xml.XmlDictionaryString -> unit
member this.WriteTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlDictionaryWriter * System.Xml.XmlDictionaryString * System.Xml.XmlDictionaryString -> unit
Public Sub WriteTo (addressingVersion As AddressingVersion, writer As XmlDictionaryWriter, localName As XmlDictionaryString, ns As XmlDictionaryString)
Public Sub WriteTo (addressingVersion As AddressingVersion, writer As XmlDictionaryWriter, localname As XmlDictionaryString, ns As XmlDictionaryString)

Parametri

addressingVersion
AddressingVersion

Oggetto AddressingVersion dell'indirizzo endpoint corrente.

writer
XmlDictionaryWriter

Oggetto XmlDictionaryWriter in cui viene salvato l'indirizzo endpoint.

localNamelocalname
XmlDictionaryString

Nome locale del nodo XML che deve contenere l'indirizzo endpoint.

ns
XmlDictionaryString

Oggetto XmlDictionaryString contenente lo spazio dei nomi del nodo XML che deve contenere l'indirizzo endpoint.

Eccezioni

writer, addressingVersion, localName o ns è null.

Esempio

    XmlWriter writer = XmlWriter.Create("addressdata.xml");
    XmlDictionaryWriter dictWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer);

    XmlDictionary d = new XmlDictionary();
    XmlDictionaryString xdLocalName = new XmlDictionaryString(XmlDictionary.Empty, "EndpointReference",0);
    XmlDictionaryString xdNamespace = new XmlDictionaryString(XmlDictionary.Empty, "http://www.w3.org/2005/08/addressing", 0);
    
    endpointAddress.WriteTo(
                AddressingVersion.WSAddressing10,
                dictWriter,
                xdLocalName,
                xdNamespace);
    writer.Close();

Si applica a

WriteTo(AddressingVersion, XmlWriter, String, String)

Salva l'indirizzo endpoint corrente di una versione specificata in un writer XML con uno spazio dei nomi e un nome locale specificati.

public:
 void WriteTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlWriter ^ writer, System::String ^ localName, System::String ^ ns);
public:
 void WriteTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlWriter ^ writer, System::String ^ localname, System::String ^ ns);
public void WriteTo (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlWriter writer, string localName, string ns);
public void WriteTo (System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlWriter writer, string localname, string ns);
member this.WriteTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlWriter * string * string -> unit
member this.WriteTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlWriter * string * string -> unit
Public Sub WriteTo (addressingVersion As AddressingVersion, writer As XmlWriter, localName As String, ns As String)
Public Sub WriteTo (addressingVersion As AddressingVersion, writer As XmlWriter, localname As String, ns As String)

Parametri

addressingVersion
AddressingVersion

Oggetto AddressingVersion dell'indirizzo endpoint corrente.

writer
XmlWriter

Oggetto XmlWriter in cui viene salvato l'indirizzo endpoint.

localNamelocalname
String

Nome locale del nodo XML che deve contenere l'indirizzo endpoint.

ns
String

Oggetto XmlDictionaryString contenente lo spazio dei nomi del nodo XML che deve contenere l'indirizzo endpoint.

Eccezioni

writer, addressingVersion, localName o ns è null.

Esempio

    XmlWriter writer = XmlWriter.Create("addressdata.xml");
    XmlDictionaryWriter dictWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer);

    XmlDictionary d = new XmlDictionary();
    XmlDictionaryString xdLocalName = new XmlDictionaryString(XmlDictionary.Empty, "EndpointReference",0);
    XmlDictionaryString xdNamespace = new XmlDictionaryString(XmlDictionary.Empty, "http://www.w3.org/2005/08/addressing", 0);
    
    endpointAddress.WriteTo(
                AddressingVersion.WSAddressing10,
                dictWriter,
                xdLocalName,
                xdNamespace);
    writer.Close();

Si applica a