//--------------------------------------------------------------------- // Static members internal static GeoQuery FromMessage(GeoQueryMsg queryMsg) { GeoQuery query = new GeoQuery(); string value; query.Options = GeoQueryOptions.Load(queryMsg); query.EntityFilters = queryMsg._GetArray("EntityFilter"); query.GroupFilters = queryMsg._GetArray("QueryFilter"); value = queryMsg._Get("Region", (string)null); if (!string.IsNullOrWhiteSpace(value)) { query.Region = GeoRegion.Parse(value); } if (!string.IsNullOrWhiteSpace(queryMsg["MinTimeUtc"])) { query.MinTimeUtc = queryMsg._Get("MinTimeUtc", DateTime.MinValue); } if (!string.IsNullOrWhiteSpace(queryMsg["MaxTimeUtc"])) { query.MaxTimeUtc = queryMsg._Get("MaxTimeUtc", DateTime.MaxValue); } return(query); }
/// <summary> /// Initiates an asynchronous location based query against the GeoTracker cluster. /// </summary> /// <param name="query">The query.</param> /// <param name="callback">The completion callback or <c>null</c>.</param> /// <param name="state">Application state or <c>null</c>.</param> /// <returns>The <see cref="IAsyncResult" /> to be used to track the progress of the operation.</returns> /// <exception cref="ArgumentNullException">Thrown if <paramref name="query" /> is <c>null</c>.</exception> /// <remarks> /// <note> /// All calls to <see cref="BeginQuery" /> must eventually be followed by a call to <see cref="EndQuery" />. /// </note> /// </remarks> public IAsyncResult BeginQuery(GeoQuery query, AsyncCallback callback, object state) { if (query == null) { throw new ArgumentNullException("query"); } throw new NotImplementedException(); }
/// <summary> /// Performs a synchronous location based query against the GeoTracker cluster. /// </summary> /// <param name="query">The query.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="query" /> is <c>null</c>.</exception> /// <returns>The query results.</returns> public GeoQueryResults Query(GeoQuery query) { if (query == null) { throw new ArgumentNullException("query"); } throw new NotImplementedException(); }