public GeoNearResult GeoNearAs(Type documentType, IMongoQuery query, double x, double y, int limit, IMongoGeoNearOptions options) { return(_collection.GeoNearAs(documentType, query, x, y, limit, options)); }
public static Task <GeoNearResult <T> > GeoNearAsAsync <T>(this MongoCollection collection, IMongoQuery query, Double x, Double y, Int32 limit, IMongoGeoNearOptions options) { var tcs = new TaskCompletionSource <GeoNearResult <T> >(); ThreadPool.QueueUserWorkItem(_ => { try { var result = collection.GeoNearAs <T>(query, x, y, limit, options); tcs.SetResult(result); } catch (Exception exc) { tcs.SetException(exc); } }); return(tcs.Task); }
public GeoNearResult <TDocument> GeoNearAs <TDocument>(IMongoQuery query, double x, double y, int limit, IMongoGeoNearOptions options) { return(_collection.GeoNearAs <TDocument>(query, x, y, limit, options)); }