예제 #1
0
        public async Task CanQueryExtent(string rootUrl, string relativeUrl)
        {
            var gateway = new PortalGateway(rootUrl);

            var query  = new QueryForExtent(relativeUrl.AsEndpoint());
            var result = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() =>
            {
                return(gateway.QueryForExtent(query));
            });

            Assert.NotNull(result);
            Assert.Null(result.Error);
            Assert.True(result.NumberOfResults > 0);
            Assert.NotNull(result.Extent);
            Assert.NotNull(result.Extent.SpatialReference);
            Assert.NotNull(result.Extent.GetCenter());
        }
 /// <summary>
 /// Call the extent operation for the query resource.
 /// </summary>
 /// <param name="queryOptions">Query filter parameters</param>
 /// <param name="ct">Optional cancellation token to cancel pending request</param>
 /// <returns>The number of results that match the query and the bounding extent</returns>
 public virtual Task <QueryForExtentResponse> QueryForExtent(QueryForExtent queryOptions, CancellationToken ct = default(CancellationToken))
 {
     return(Get <QueryForExtentResponse, QueryForExtent>(queryOptions, ct));
 }