コード例 #1
0
ファイル: BsonWriter.cs プロジェクト: zhongnan1996/SequoiaDB
 /// <summary>
 /// Creates a BsonWriter to a BsonBuffer.
 /// </summary>
 /// <param name="buffer">A BsonBuffer.</param>
 /// <param name="settings">Optional BsonBinaryWriterSettings.</param>
 /// <returns>A BsonWriter.</returns>
 public static BsonWriter Create(BsonBuffer buffer, BsonBinaryWriterSettings settings)
 {
     return(new BsonBinaryWriter(null, buffer, settings));
 }
コード例 #2
0
ファイル: BsonReader.cs プロジェクト: sunmoonone/SequoiaDB-1
 /// <summary>
 /// Creates a BsonReader for a BsonBuffer.
 /// </summary>
 /// <param name="buffer">The BsonBuffer.</param>
 /// <param name="settings">Optional reader settings.</param>
 /// <returns>A BsonReader.</returns>
 public static BsonReader Create(BsonBuffer buffer, BsonBinaryReaderSettings settings)
 {
     return(new BsonBinaryReader(buffer, settings));
 }
コード例 #3
0
ファイル: BsonReader.cs プロジェクト: sunmoonone/SequoiaDB-1
 // public static methods
 /// <summary>
 /// Creates a BsonReader for a BsonBuffer.
 /// </summary>
 /// <param name="buffer">The BsonBuffer.</param>
 /// <returns>A BsonReader.</returns>
 public static BsonReader Create(BsonBuffer buffer)
 {
     return(Create(buffer, BsonBinaryReaderSettings.Defaults));
 }
コード例 #4
0
 // constructors
 /// <summary>
 /// Initializes a new instance of the BsonBinaryWriter class.
 /// </summary>
 /// <param name="stream">A stream.</param>
 /// <param name="buffer">A BsonBuffer.</param>
 /// <param name="settings">Optional BsonBinaryWriter settings.</param>
 public BsonBinaryWriter(Stream stream, BsonBuffer buffer, BsonBinaryWriterSettings settings)
     : this(buffer ?? new BsonBuffer(), buffer == null, settings)
 {
     _stream = stream;
 }