Table of Contents

Method WithinCircle

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

WithinCircle<TMember>(Expression<Func<TDocument, TMember>>, double, double, double)

Tests that the value of the named element is within a circle (see $within and $center).

public IMongoQuery WithinCircle<TMember>(Expression<Func<TDocument, TMember>> memberExpression, double centerX, double centerY, double radius)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression representing the element to test.

centerX double

The x coordinate of the origin.

centerY double

The y coordinate of the origin.

radius double

The radius of the circle.

Returns

IMongoQuery

An IMongoQuery.

Type Parameters

TMember

The member type.

WithinCircle<TMember>(Expression<Func<TDocument, TMember>>, double, double, double, bool)

Tests that the value of the named element is within a circle (see $within and $center).

public IMongoQuery WithinCircle<TMember>(Expression<Func<TDocument, TMember>> memberExpression, double centerX, double centerY, double radius, bool spherical)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression representing the element to test.

centerX double

The x coordinate of the origin.

centerY double

The y coordinate of the origin.

radius double

The radius of the circle.

spherical bool

if set to true [spherical].

Returns

IMongoQuery

An IMongoQuery.

Type Parameters

TMember

The member type.