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();