Constructor CreateViewOptionsDocument
CreateViewOptionsDocument()
Initializes a new instance of the CreateViewOptionsDocument class.
public CreateViewOptionsDocument()
CreateViewOptionsDocument(bool)
Initializes a new instance of the CreateViewOptionsDocument class specifying whether duplicate element names are allowed (allowing duplicate element names is not recommended).
public CreateViewOptionsDocument(bool allowDuplicateNames)
Parameters
allowDuplicateNamesboolWhether duplicate element names are allowed.
CreateViewOptionsDocument(BsonElement)
Initializes a new instance of the CreateViewOptionsDocument class and adds one element.
public CreateViewOptionsDocument(BsonElement element)
Parameters
elementBsonElementAn element to add to the document.
CreateViewOptionsDocument(Dictionary<string, object>)
Initializes a new instance of the CreateViewOptionsDocument class and adds new elements from a dictionary of key/value pairs.
public CreateViewOptionsDocument(Dictionary<string, object> dictionary)
Parameters
dictionaryDictionary<string, object>A dictionary to initialize the document from.
CreateViewOptionsDocument(Dictionary<string, object>, IEnumerable<string>)
Initializes a new instance of the CreateViewOptionsDocument class and adds new elements from a dictionary of key/value pairs.
[Obsolete("Use CreateViewOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public CreateViewOptionsDocument(Dictionary<string, object> dictionary, IEnumerable<string> keys)
Parameters
dictionaryDictionary<string, object>A dictionary to initialize the document from.
keysIEnumerable<string>A list of keys to select values from the dictionary.
CreateViewOptionsDocument(IEnumerable<KeyValuePair<string, object>>)
Initializes a new instance of the CreateViewOptionsDocument class and adds new elements from a dictionary of key/value pairs.
public CreateViewOptionsDocument(IEnumerable<KeyValuePair<string, object>> dictionary)
Parameters
dictionaryIEnumerable<KeyValuePair<string, object>>A dictionary to initialize the document from.
CreateViewOptionsDocument(IDictionary<string, object>, IEnumerable<string>)
Initializes a new instance of the CreateViewOptionsDocument class and adds new elements from a dictionary of key/value pairs.
[Obsolete("Use CreateViewOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public CreateViewOptionsDocument(IDictionary<string, object> dictionary, IEnumerable<string> keys)
Parameters
dictionaryIDictionary<string, object>A dictionary to initialize the document from.
keysIEnumerable<string>A list of keys to select values from the dictionary.
CreateViewOptionsDocument(IDictionary)
Initializes a new instance of the CreateViewOptionsDocument class and adds new elements from a dictionary of key/value pairs.
public CreateViewOptionsDocument(IDictionary dictionary)
Parameters
dictionaryIDictionaryA dictionary to initialize the document from.
CreateViewOptionsDocument(IDictionary, IEnumerable)
Initializes a new instance of the CreateViewOptionsDocument class and adds new elements from a dictionary of key/value pairs.
[Obsolete("Use CreateViewOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public CreateViewOptionsDocument(IDictionary dictionary, IEnumerable keys)
Parameters
dictionaryIDictionaryA dictionary to initialize the document from.
keysIEnumerableA list of keys to select values from the dictionary.
CreateViewOptionsDocument(IEnumerable<BsonElement>)
Initializes a new instance of the CreateViewOptionsDocument class and adds new elements from a list of elements.
public CreateViewOptionsDocument(IEnumerable<BsonElement> elements)
Parameters
elementsIEnumerable<BsonElement>A list of elements to add to the document.
CreateViewOptionsDocument(params BsonElement[])
Initializes a new instance of the CreateViewOptionsDocument class and adds one or more elements.
[Obsolete("Use CreateViewOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public CreateViewOptionsDocument(params BsonElement[] elements)
Parameters
elementsBsonElement[]One or more elements to add to the document.
CreateViewOptionsDocument(string, BsonValue)
Initializes a new instance of the CreateViewOptionsDocument class and creates and adds a new element.
public CreateViewOptionsDocument(string name, BsonValue value)