MongoDB.Bson.IO.BsonBinaryWriter.WriteInt64 C# (CSharp) Method

WriteInt64() public method

Writes a BSON Int64 to the writer.
public WriteInt64 ( long value ) : void
value long The Int64 value.
return void
        public override void WriteInt64(long value)
        {
            if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); }
            if (State != BsonWriterState.Value)
            {
                ThrowInvalidState("WriteInt64", BsonWriterState.Value);
            }

            _buffer.WriteByte((byte)BsonType.Int64);
            WriteNameHelper();
            _buffer.WriteInt64(value);

            State = GetNextState();
        }