CSMongo.IO.DynamicStream.Append C# (CSharp) Метод

Append() публичный Метод

Appends the byte to the end of the stream
public Append ( byte @byte ) : void
@byte byte
Результат void
        public void Append(byte @byte)
        {
            this._Reset();
            this._Output.Add(@byte);
        }

Usage Example

Пример #1
0
        /// <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());
            }
        }
All Usage Examples Of CSMongo.IO.DynamicStream::Append