MongoDB.Driver.Builders.DeprecatedQuery.WithinPolygon C# (CSharp) Method

WithinPolygon() public static method

Tests that the value of the named element is within a polygon (see $within and $polygon).
public static WithinPolygon ( string name, double points ) : QueryConditionList
name string The name of the element to test.
points double An array of points that defines the polygon (the second dimension must be of length 2).
return QueryConditionList
        public static QueryConditionList WithinPolygon(string name, double[,] points)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (points == null)
            {
                throw new ArgumentNullException("points");
            }
            return new QueryConditionList(name).WithinPolygon(points);
        }

Usage Example

        public void TestWithinPolygonInvalidSecondDimension()
        {
            var points = new double[, ] {
                { 1, 2, 3 }
            };

            Assert.Throws <ArgumentOutOfRangeException>(() => Query.WithinPolygon("loc", points));
        }
All Usage Examples Of MongoDB.Driver.Builders.DeprecatedQuery::WithinPolygon