CSMongo.Requests.DeleteRequest.GenerateBody C# (CSharp) Method

GenerateBody() protected method

Prepares the body of the request to send to the server
protected GenerateBody ( DynamicStream stream ) : void
stream CSMongo.IO.DynamicStream
return void
        protected override void GenerateBody(DynamicStream stream)
        {
            //required ZERO byte after header
            stream.Append(BsonTranslator.AsInt32(0));

            //apply the collection and database
            stream.Append(BsonTranslator.AsString(this.GetDatabaseTarget()));

            //required ZERO byte before selector
            stream.Append(BsonTranslator.AsInt32(0));

            //then the actual selection
            stream.Append(this.Parameters.ToBsonByteArray());
        }