Class GeoNearOptionsBuilder
A builder for the options of the GeoNear command.
[Serializable]
[Obsolete("Use GeoNearArgs instead.")]
[BsonSerializer(typeof(GeoNearOptionsBuilder.Serializer))]
public class GeoNearOptionsBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoGeoNearOptions
- Inheritance
-
GeoNearOptionsBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
GeoNearOptionsBuilder()
Initializes a new instance of the GeoNearOptionsBuilder class.
public GeoNearOptionsBuilder()
Methods
SetDistanceMultiplier(double)
Sets the distance multiplier.
public GeoNearOptionsBuilder SetDistanceMultiplier(double value)
Parameters
value
doubleThe distance multiplier.
Returns
- GeoNearOptionsBuilder
The builder (so method calls can be chained).
SetMaxDistance(double)
Sets the max distance.
public GeoNearOptionsBuilder SetMaxDistance(double value)
Parameters
value
doubleThe max distance.
Returns
- GeoNearOptionsBuilder
The builder (so method calls can be chained).
SetSpherical(bool)
Sets whether to use a spherical search.
public GeoNearOptionsBuilder SetSpherical(bool value)
Parameters
value
boolWhether to use a spherical search.
Returns
- GeoNearOptionsBuilder
The builder (so method calls can be chained).
ToBsonDocument()
Returns the result of the builder as a BsonDocument.
public override BsonDocument ToBsonDocument()
Returns
- BsonDocument
A BsonDocument.