Table of Contents

Class CommandDocument

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

Represents a BSON document that can be used where an IMongoCommand is expected.

[BsonSerializer(typeof(CommandDocument.Serializer))]
public class CommandDocument : QueryDocument, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonDocument>, IConvertibleToBsonDocument, IEnumerable<BsonElement>, IEnumerable, IEquatable<BsonDocument>, IMongoCommand, IMongoQuery
Inheritance
CommandDocument
Implements
Inherited Members
Extension Methods

Constructors

CommandDocument()

Initializes a new instance of the CommandDocument class.

CommandDocument(BsonElement)

Initializes a new instance of the CommandDocument class and adds one element.

CommandDocument(params BsonElement[])

Initializes a new instance of the CommandDocument class and adds one or more elements.

CommandDocument(bool)

Initializes a new instance of the CommandDocument class specifying whether duplicate element names are allowed (allowing duplicate element names is not recommended).

CommandDocument(Dictionary<string, object>)

Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs.

CommandDocument(Dictionary<string, object>, IEnumerable<string>)

Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs.

CommandDocument(IDictionary<string, object>, IEnumerable<string>)

Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs.

CommandDocument(IEnumerable<BsonElement>)

Initializes a new instance of the CommandDocument class and adds new elements from a list of elements.

CommandDocument(IEnumerable<KeyValuePair<string, object>>)

Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs.

CommandDocument(IDictionary)

Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs.

CommandDocument(IDictionary, IEnumerable)

Initializes a new instance of the CommandDocument class and adds new elements from a dictionary of key/value pairs.

CommandDocument(string, BsonValue)

Initializes a new instance of the CommandDocument class and creates and adds a new element.