EndpointAddress.WriteTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Saves the current endpoint address of a specified version to an XML writer or an XML dictionary writer.
Overloads
WriteTo(AddressingVersion, XmlDictionaryWriter) |
Saves the current endpoint address of a specified version to a specified XML dictionary writer. |
WriteTo(AddressingVersion, XmlWriter) |
Saves the current endpoint address of a specified version to a specified XML writer. |
WriteTo(AddressingVersion, XmlDictionaryWriter, XmlDictionaryString, XmlDictionaryString) |
Saves the current endpoint address of a specified version to an XML dictionary writer with a specified namespace and local name. |
WriteTo(AddressingVersion, XmlWriter, String, String) |
Saves the current endpoint address of a specified version to an XML writer with a specified namespace and local name. |
WriteTo(AddressingVersion, XmlDictionaryWriter)
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
Saves the current endpoint address of a specified version to a specified XML dictionary writer.
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)
Parameters
- addressingVersion
- AddressingVersion
The AddressingVersion of the current endpoint address.
- writer
- XmlDictionaryWriter
The XmlDictionaryWriter to which the endpoint address is saved.
Exceptions
writer
or addressingVersion
is null
.
Examples
XmlWriter writer = XmlWriter.Create("addressdata.xml");
XmlDictionaryWriter dictWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer);
endpointAddress.WriteTo(
AddressingVersion.WSAddressing10,
dictWriter);
writer.Close();
Applies to
WriteTo(AddressingVersion, XmlWriter)
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
Saves the current endpoint address of a specified version to a specified XML writer.
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)
Parameters
- addressingVersion
- AddressingVersion
The AddressingVersion of the current endpoint address.
Exceptions
writer
or addressingVersion
is null
.
Examples
XmlWriter writer = XmlWriter.Create("addressdata.xml");
endpointAddress.WriteTo(
AddressingVersion.WSAddressing10,
writer);
writer.Close();
Applies to
WriteTo(AddressingVersion, XmlDictionaryWriter, XmlDictionaryString, XmlDictionaryString)
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
Saves the current endpoint address of a specified version to an XML dictionary writer with a specified namespace and local name.
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
Public Sub WriteTo (addressingVersion As AddressingVersion, writer As XmlDictionaryWriter, localName As XmlDictionaryString, ns As XmlDictionaryString)
Parameters
- addressingVersion
- AddressingVersion
The AddressingVersion of the current endpoint address.
- writer
- XmlDictionaryWriter
The XmlDictionaryWriter to which the endpoint address is saved.
- localName
- XmlDictionaryString
The local name for the XML node to contain the endpoint address.
The XmlDictionaryString that contains the namespace for the XML node to contain the endpoint address.
Exceptions
writer
or addressingVersion
or localName
or ns
is null
.
Examples
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();
Applies to
WriteTo(AddressingVersion, XmlWriter, String, String)
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
- Source:
- EndpointAddress.cs
Saves the current endpoint address of a specified version to an XML writer with a specified namespace and local name.
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);
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)
Parameters
- addressingVersion
- AddressingVersion
The AddressingVersion of the current endpoint address.
- localName
- String
The local name for the XML node to contain the endpoint address.
- ns
- String
The XmlDictionaryString that contains the namespace for the XML node to contain the endpoint address.
Exceptions
writer
or addressingVersion
or localName
or ns
is null
.
Examples
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();