Example #1
0
 /// <summary>
 /// Represents a request for a find against a service resource
 /// </summary>
 /// <param name="endpoint">Resource to apply the query against</param>
 public Find(ArcGISServerEndpoint endpoint)
     : base(endpoint, Operations.Find)
 {
     FuzzySearch = true;
     ReturnGeometry = true;
     ReturnZ = true;
 }
Example #2
0
        public void ArcGISServerEndpointHasCorrectFormat()
        {
            Assert.Throws<ArgumentNullException>(() => new ArcGISServerEndpoint(""));

            var endpoint2 = new ArcGISServerEndpoint("/rest/services/rest/services/rest/services/");
            Assert.True(endpoint2.RelativeUrl.StartsWith("rest/services/", StringComparison.InvariantCultureIgnoreCase));

            var endpoint3 = new ArcGISServerEndpoint("something/MapServer");
            Assert.True(endpoint3.RelativeUrl.StartsWith("rest/services/", StringComparison.InvariantCultureIgnoreCase));

            var endpoint4 = new ArcGISServerEndpoint("/rest/services/");
            Assert.True(endpoint4.RelativeUrl.StartsWith("rest/services/", StringComparison.InvariantCultureIgnoreCase));

            var endpoint5 = new ArcGISServerEndpoint("rest/services/");
            Assert.True(endpoint5.RelativeUrl.StartsWith("rest/services/", StringComparison.InvariantCultureIgnoreCase));

            var endpoint6 = new ArcGISServerEndpoint("rest/services");
            Assert.True(endpoint6.RelativeUrl.StartsWith("rest/services/", StringComparison.InvariantCultureIgnoreCase));

            var endpoint7 = new ArcGISServerEndpoint("/rest/services");
            Assert.True(endpoint7.RelativeUrl.StartsWith("rest/services/", StringComparison.InvariantCultureIgnoreCase));

            var endpoint8 = new ArcGISServerEndpoint("/");
            Assert.True(endpoint8.RelativeUrl.StartsWith("rest/services/", StringComparison.InvariantCultureIgnoreCase));
        }
 protected ArcGISServerOperation(ArcGISServerEndpoint endpoint, String operationPath)
 {
     if (endpoint == null) throw new ArgumentNullException("endpoint");
     _relativeUrl = endpoint.RelativeUrl.Trim('/') + "/" + operationPath.Trim('/');
 }
 public SingleInputGeocode(ArcGISServerEndpoint endpoint)
     : base(endpoint, Operations.SingleInputGeocode)
 {
     MaxResults = 1;
     Distance = null;
 }
Example #5
0
 protected GeocodeOperation(ArcGISServerEndpoint endpoint, String operationPath)
     : base(endpoint, operationPath)
 {
     Distance = 100;
 }
Example #6
0
 public ReverseGeocode(ArcGISServerEndpoint endpoint)
     : base(endpoint, Operations.ReverseGeocode)
 { }
Example #7
0
 public SuggestGeocode(ArcGISServerEndpoint endpoint)
     : base(endpoint, Operations.SuggestGeocode)
 {
     Distance = null;
 }
Example #8
0
 public SingleInputCustomGeocode(ArcGISServerEndpoint endpoint)
     : base(endpoint, Operations.SingleInputCustomGeocode)
 { }