Class GeoNearOptionsDocument
Represents a BSON document that can be used where an IMongoGeoNearOptions is expected.
[BsonSerializer(typeof(GeoNearOptionsDocument.Serializer))]
[Obsolete("Use GeoHaystackSearchArgs instead.")]
public class GeoNearOptionsDocument : BsonDocument, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonDocument>, IConvertibleToBsonDocument, IEnumerable<BsonElement>, IEnumerable, IEquatable<BsonDocument>, IMongoGeoNearOptions
- Inheritance
-
GeoNearOptionsDocument
- Implements
- Inherited Members
- Extension Methods
Constructors
GeoNearOptionsDocument()
Initializes a new instance of the GeoNearOptionsDocument class.
public GeoNearOptionsDocument()
GeoNearOptionsDocument(BsonElement)
Initializes a new instance of the GeoNearOptionsDocument class and adds one element.
public GeoNearOptionsDocument(BsonElement element)
Parameters
elementBsonElementAn element to add to the document.
GeoNearOptionsDocument(params BsonElement[])
Initializes a new instance of the GeoNearOptionsDocument class and adds one or more elements.
[Obsolete("Use GeoNearOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public GeoNearOptionsDocument(params BsonElement[] elements)
Parameters
elementsBsonElement[]One or more elements to add to the document.
GeoNearOptionsDocument(bool)
Initializes a new instance of the GeoNearOptionsDocument class specifying whether duplicate element names are allowed (allowing duplicate element names is not recommended).
public GeoNearOptionsDocument(bool allowDuplicateNames)
Parameters
allowDuplicateNamesboolWhether duplicate element names are allowed.
GeoNearOptionsDocument(Dictionary<string, object>)
Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs.
public GeoNearOptionsDocument(Dictionary<string, object> dictionary)
Parameters
dictionaryDictionary<string, object>A dictionary to initialize the document from.
GeoNearOptionsDocument(Dictionary<string, object>, IEnumerable<string>)
Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs.
[Obsolete("Use GeoNearOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public GeoNearOptionsDocument(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.
GeoNearOptionsDocument(IDictionary<string, object>, IEnumerable<string>)
Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs.
[Obsolete("Use GeoNearOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public GeoNearOptionsDocument(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.
GeoNearOptionsDocument(IEnumerable<BsonElement>)
Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a list of elements.
public GeoNearOptionsDocument(IEnumerable<BsonElement> elements)
Parameters
elementsIEnumerable<BsonElement>A list of elements to add to the document.
GeoNearOptionsDocument(IEnumerable<KeyValuePair<string, object>>)
Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs.
public GeoNearOptionsDocument(IEnumerable<KeyValuePair<string, object>> dictionary)
Parameters
dictionaryIEnumerable<KeyValuePair<string, object>>A dictionary to initialize the document from.
GeoNearOptionsDocument(IDictionary)
Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs.
public GeoNearOptionsDocument(IDictionary dictionary)
Parameters
dictionaryIDictionaryA dictionary to initialize the document from.
GeoNearOptionsDocument(IDictionary, IEnumerable)
Initializes a new instance of the GeoNearOptionsDocument class and adds new elements from a dictionary of key/value pairs.
[Obsolete("Use GeoNearOptionsDocument<IEnumerable<BsonElement> elements) instead.")]
public GeoNearOptionsDocument(IDictionary dictionary, IEnumerable keys)
Parameters
dictionaryIDictionaryA dictionary to initialize the document from.
keysIEnumerableA list of keys to select values from the dictionary.
GeoNearOptionsDocument(string, BsonValue)
Initializes a new instance of the GeoNearOptionsDocument class and creates and adds a new element.
public GeoNearOptionsDocument(string name, BsonValue value)