语言

XmlSerializerOutputFormatter.CreateXmlWriter 方法

定义

重载

CreateXmlWriter(TextWriter, XmlWriterSettings)

Source:
XmlSerializerOutputFormatter.cs
Source:
XmlSerializerOutputFormatter.cs
Source:
XmlSerializerOutputFormatter.cs

使用给定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

XmlWriterSettings。

返回

XmlWriter 的新实例。

适用于

CreateXmlWriter(OutputFormatterWriteContext, TextWriter, XmlWriterSettings)

Source:
XmlSerializerOutputFormatter.cs
Source:
XmlSerializerOutputFormatter.cs
Source:
XmlSerializerOutputFormatter.cs

使用给定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

XmlWriterSettings。

返回

的新实例 XmlWriter

适用于