MongoDB.Bson.IO.BsonWriter.WriteMaxKey C# (CSharp) Method

WriteMaxKey() public abstract method

Writes a BSON MaxKey to the writer.
public abstract WriteMaxKey ( ) : void
return void
        public abstract void WriteMaxKey();

Same methods

BsonWriter::WriteMaxKey ( string name ) : void

Usage Example

 /// <summary>
 /// Serializes an object to a BsonWriter.
 /// </summary>
 /// <param name="bsonWriter">The BsonWriter.</param>
 /// <param name="nominalType">The nominal type.</param>
 /// <param name="value">The object.</param>
 /// <param name="options">The serialization options.</param>
 public override void Serialize(
     BsonWriter bsonWriter,
     Type nominalType,
     object value,
     IBsonSerializationOptions options
 ) {
     if (value == null) {
         bsonWriter.WriteNull();
     } else {
         bsonWriter.WriteMaxKey();
     }
 }
All Usage Examples Of MongoDB.Bson.IO.BsonWriter::WriteMaxKey