XmlSerializerOutputFormatter.CreateXmlWriter 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
CreateXmlWriter(TextWriter, XmlWriterSettings)
使用指定的 TextWriter 和 XmlWriterSettings ,建立 的新實例 XmlWriter 。
public:
virtual System::Xml::XmlWriter ^ CreateXmlWriter(System::IO::TextWriter ^ writer, System::Xml::XmlWriterSettings ^ xmlWriterSettings);
public virtual System.Xml.XmlWriter CreateXmlWriter (System.IO.TextWriter writer, System.Xml.XmlWriterSettings xmlWriterSettings);
abstract member CreateXmlWriter : System.IO.TextWriter * System.Xml.XmlWriterSettings -> System.Xml.XmlWriter
override this.CreateXmlWriter : System.IO.TextWriter * System.Xml.XmlWriterSettings -> System.Xml.XmlWriter
Public Overridable Function CreateXmlWriter (writer As TextWriter, xmlWriterSettings As XmlWriterSettings) As XmlWriter
參數
- writer
- TextWriter
應該寫入的基礎 TextWriterXmlWriter 。
- xmlWriterSettings
- XmlWriterSettings
傳回
XmlWriter 的新執行個體。
適用於
CreateXmlWriter(OutputFormatterWriteContext, TextWriter, XmlWriterSettings)
使用指定的 TextWriter 和 XmlWriterSettings ,建立 的新實例 XmlWriter 。
public:
virtual System::Xml::XmlWriter ^ CreateXmlWriter(Microsoft::AspNetCore::Mvc::Formatters::OutputFormatterWriteContext ^ context, System::IO::TextWriter ^ writer, System::Xml::XmlWriterSettings ^ xmlWriterSettings);
public virtual System.Xml.XmlWriter CreateXmlWriter (Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext context, System.IO.TextWriter writer, System.Xml.XmlWriterSettings xmlWriterSettings);
abstract member CreateXmlWriter : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext * System.IO.TextWriter * System.Xml.XmlWriterSettings -> System.Xml.XmlWriter
override this.CreateXmlWriter : Microsoft.AspNetCore.Mvc.Formatters.OutputFormatterWriteContext * System.IO.TextWriter * System.Xml.XmlWriterSettings -> System.Xml.XmlWriter
Public Overridable Function CreateXmlWriter (context As OutputFormatterWriteContext, writer As TextWriter, xmlWriterSettings As XmlWriterSettings) As XmlWriter
參數
- context
- OutputFormatterWriteContext
與呼叫相關聯的格式器內容。
- writer
- TextWriter
應該寫入的基礎 TextWriterXmlWriter 。
- xmlWriterSettings
- XmlWriterSettings
傳回
的新實例 XmlWriter