XmlDictionaryWriter.CreateBinaryWriter メソッド

定義

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

オーバーロード

CreateBinaryWriter(Stream)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

CreateBinaryWriter(Stream, IXmlDictionary)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession, Boolean)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

注釈

バイナリ形式は属性値として 1 つのテキスト ノードしかサポートしないので、次のサンプル コードで示すように、単一のノードに出力するために書き込まれる値をバッファーします。The binary format only supports one text node as the attribute value and therefore buffers the values written to it to emit a single node, as shown in the following sample code.

XmlWriter binarywriter = XmlDictionaryWriter.CreateBinaryWriter(Stream.Null);  
binarywriter.WriteStartAttribute("StartAttribute");  
string largeStr = new string('r', 100000);  
for (int i = 0; i < 10000; i++)   
{  
    binarywriter.WriteValue(largeStr);  
}  
binarywriter.WriteEndAttribute();  
  

前のサンプル コードでは約 1 GB のメモリをバッファーしますが、他のライターでは提供された値をそのまま書き込みます。In the previous sample the code buffers about 1 GB of memory, while in the other writers it writes the values as they are provided.

CreateBinaryWriter(Stream)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

public:
 static System::Xml::XmlDictionaryWriter ^ CreateBinaryWriter(System::IO::Stream ^ stream);
public static System.Xml.XmlDictionaryWriter CreateBinaryWriter (System.IO.Stream stream);
static member CreateBinaryWriter : System.IO.Stream -> System.Xml.XmlDictionaryWriter

パラメーター

stream
Stream

書き込まれるストリーム。The stream to write to.

戻り値

XmlDictionaryWriter のインスタンス。An instance of XmlDictionaryWriter.

CreateBinaryWriter(Stream, IXmlDictionary)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

public:
 static System::Xml::XmlDictionaryWriter ^ CreateBinaryWriter(System::IO::Stream ^ stream, System::Xml::IXmlDictionary ^ dictionary);
public static System.Xml.XmlDictionaryWriter CreateBinaryWriter (System.IO.Stream stream, System.Xml.IXmlDictionary dictionary);
static member CreateBinaryWriter : System.IO.Stream * System.Xml.IXmlDictionary -> System.Xml.XmlDictionaryWriter

パラメーター

stream
Stream

書き込まれるストリーム。The stream to write to.

dictionary
IXmlDictionary

共有ディクショナリとして使用する XmlDictionaryThe XmlDictionary to use as the shared dictionary.

戻り値

XmlDictionaryWriter のインスタンス。An instance of XmlDictionaryWriter.

CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

public:
 static System::Xml::XmlDictionaryWriter ^ CreateBinaryWriter(System::IO::Stream ^ stream, System::Xml::IXmlDictionary ^ dictionary, System::Xml::XmlBinaryWriterSession ^ session);
public static System.Xml.XmlDictionaryWriter CreateBinaryWriter (System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlBinaryWriterSession session);
static member CreateBinaryWriter : System.IO.Stream * System.Xml.IXmlDictionary * System.Xml.XmlBinaryWriterSession -> System.Xml.XmlDictionaryWriter

パラメーター

stream
Stream

書き込まれるストリーム。The stream to write to.

dictionary
IXmlDictionary

共有ディクショナリとして使用する XmlDictionaryThe XmlDictionary to use as the shared dictionary.

戻り値

XmlDictionaryWriter のインスタンス。An instance of XmlDictionaryWriter.

CreateBinaryWriter(Stream, IXmlDictionary, XmlBinaryWriterSession, Boolean)

WCF バイナリ XML 形式を書き込む XmlDictionaryWriter のインスタンスを作成します。Creates an instance of XmlDictionaryWriter that writes WCF binary XML format.

public:
 static System::Xml::XmlDictionaryWriter ^ CreateBinaryWriter(System::IO::Stream ^ stream, System::Xml::IXmlDictionary ^ dictionary, System::Xml::XmlBinaryWriterSession ^ session, bool ownsStream);
public static System.Xml.XmlDictionaryWriter CreateBinaryWriter (System.IO.Stream stream, System.Xml.IXmlDictionary dictionary, System.Xml.XmlBinaryWriterSession session, bool ownsStream);
static member CreateBinaryWriter : System.IO.Stream * System.Xml.IXmlDictionary * System.Xml.XmlBinaryWriterSession * bool -> System.Xml.XmlDictionaryWriter

パラメーター

stream
Stream

読み込み元のストリーム。The stream from which to read.

dictionary
IXmlDictionary

共有ディクショナリとして使用する XmlDictionaryThe XmlDictionary to use as the shared dictionary.

ownsStream
Boolean

完了時にストリームがライターによって閉じられる場合は true、それ以外の場合は falsetrue to indicate that the stream is closed by the writer when done; otherwise false.

戻り値

XmlDictionaryWriter のインスタンス。An instance of XmlDictionaryWriter.

適用対象