Table of Contents

Constructor GeoNearOptionsDocument

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

GeoNearOptionsDocument()

Initializes a new instance of the GeoNearOptionsDocument class.

public GeoNearOptionsDocument()

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

allowDuplicateNames bool

Whether duplicate element names are allowed.

GeoNearOptionsDocument(BsonElement)

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

public GeoNearOptionsDocument(BsonElement element)

Parameters

element BsonElement

An element to add to the document.

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

dictionary Dictionary<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

dictionary Dictionary<string, object>

A dictionary to initialize the document from.

keys IEnumerable<string>

A list of keys to select values from the dictionary.

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

dictionary IEnumerable<KeyValuePair<string, object>>

A dictionary to initialize the document from.

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

dictionary IDictionary<string, object>

A dictionary to initialize the document from.

keys IEnumerable<string>

A list of keys to select values from the dictionary.

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

dictionary IDictionary

A 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

dictionary IDictionary

A dictionary to initialize the document from.

keys IEnumerable

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

elements IEnumerable<BsonElement>

A list of elements 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

elements BsonElement[]

One or more elements to add to the document.

GeoNearOptionsDocument(string, BsonValue)

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

public GeoNearOptionsDocument(string name, BsonValue value)

Parameters

name string

The name of the element to add to the document.

value BsonValue

The value of the element to add to the document.