EndpointAddress.WriteContentsTo 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 all the child nodes of the node to the XML writer specified.
Overloads
| WriteContentsTo(AddressingVersion, XmlDictionaryWriter) | 
						 Saves all the child nodes of the node to the XML dictionary writer specified.  | 
        	
| WriteContentsTo(AddressingVersion, XmlWriter) | 
						 Saves all the child nodes of the node to the XML writer specified.  | 
        	
WriteContentsTo(AddressingVersion, XmlDictionaryWriter)
- Source:
 - EndpointAddress.cs
 
- Source:
 - EndpointAddress.cs
 
Saves all the child nodes of the node to the XML dictionary writer specified.
public:
 void WriteContentsTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlDictionaryWriter ^ writer);
	public void WriteContentsTo(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryWriter writer);
	member this.WriteContentsTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlDictionaryWriter -> unit
	Public Sub WriteContentsTo (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.WriteContentsTo(
                AddressingVersion.WSAddressing10,
                dictWriter);
dictWriter.Close();
  Applies to
WriteContentsTo(AddressingVersion, XmlWriter)
- Source:
 - EndpointAddress.cs
 
- Source:
 - EndpointAddress.cs
 
Saves all the child nodes of the node to the XML writer specified.
public:
 void WriteContentsTo(System::ServiceModel::Channels::AddressingVersion ^ addressingVersion, System::Xml::XmlWriter ^ writer);
	public void WriteContentsTo(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlWriter writer);
	member this.WriteContentsTo : System.ServiceModel.Channels.AddressingVersion * System.Xml.XmlWriter -> unit
	Public Sub WriteContentsTo (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.WriteContentsTo(
                AddressingVersion.WSAddressing10,
                writer);
writer.Close();