EndpointAddress.WriteContentsTo Method

Definition

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.

C#
public void WriteContentsTo(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlDictionaryWriter writer);

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

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

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

WriteContentsTo(AddressingVersion, XmlWriter)

Source:
EndpointAddress.cs
Source:
EndpointAddress.cs

Saves all the child nodes of the node to the XML writer specified.

C#
public void WriteContentsTo(System.ServiceModel.Channels.AddressingVersion addressingVersion, System.Xml.XmlWriter writer);

Parameters

addressingVersion
AddressingVersion

The AddressingVersion of the current endpoint address.

writer
XmlWriter

The XmlWriter to which the endpoint address is saved.

Exceptions

writer or addressingVersion is null.

Examples

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

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1