/// <summary>
/// Prepares the body of the request to send to the server
/// </summary>
protected override void GenerateBody(DynamicStream stream)
{
//required ZERO int after header
stream.Append(BsonTranslator.AsInt32(0));
//apply the collection and database
stream.Append(BsonTranslator.AsString(this.GetDatabaseTarget()));
//and generate each of the documents
foreach (MongoDocument document in this.Documents) {
stream.Append(document.ToBsonByteArray());
}
}