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