MongoDB.Driver.Document.Append C# (CSharp) Method

Append() public method

public Append ( String key, Object value ) : Document
key String
value Object
return Document
        public Document Append(String key, Object value)
        {
            this.Add(key, value);
            return this;
        }

Usage Example

Esempio n. 1
0
        public void TestCalculateSizeOfSimpleDoc()
        {
            Document doc = new Document();
            doc.Append("a","a");
            doc.Append("b",1);

            MemoryStream ms = new MemoryStream();
            BsonWriter writer = new BsonWriter(ms);
            //BsonDocument bdoc = BsonConvert.From(doc);

            Assert.AreEqual(21,writer.CalculateSize(doc));
        }
All Usage Examples Of MongoDB.Driver.Document::Append