EndpointAddress.WriteContentsTo 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将节点的所有子节点保存到指定的 XML 编写器中。
重载
WriteContentsTo(AddressingVersion, XmlDictionaryWriter) |
将节点的所有子节点保存到指定的 XML 字典编写器中。 |
WriteContentsTo(AddressingVersion, XmlWriter) |
将节点的所有子节点保存到指定的 XML 编写器中。 |
WriteContentsTo(AddressingVersion, XmlDictionaryWriter)
将节点的所有子节点保存到指定的 XML 字典编写器中。
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)
参数
- addressingVersion
- AddressingVersion
当前终结点地址的 AddressingVersion。
- writer
- XmlDictionaryWriter
终结点地址所保存到的 XmlDictionaryWriter。
例外
writer
或 addressingVersion
为 null
。
示例
XmlWriter writer = XmlWriter.Create("addressdata.xml");
XmlDictionaryWriter dictWriter = XmlDictionaryWriter.CreateDictionaryWriter(writer);
endpointAddress.WriteContentsTo(
AddressingVersion.WSAddressing10,
dictWriter);
dictWriter.Close();
适用于
WriteContentsTo(AddressingVersion, XmlWriter)
将节点的所有子节点保存到指定的 XML 编写器中。
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)
参数
- addressingVersion
- AddressingVersion
当前终结点地址的 AddressingVersion。
例外
writer
或 addressingVersion
为 null
。
示例
XmlWriter writer = XmlWriter.Create("addressdata.xml");
endpointAddress.WriteContentsTo(
AddressingVersion.WSAddressing10,
writer);
writer.Close();