MongoDB.Driver.Document.Append C# (CSharp) Метод

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

public Append ( String key, Object value ) : Document
key String
value Object
Результат Document
        public Document Append(String key, Object value)
        {
            this.Add(key, value);
            return this;
        }

Usage Example

Пример #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