Thetype exposes the following members.
Initializes a new instance of theclass based on the provided path to a geoprocessing package.
Initializes a new instance of theclass based on the provided path to a geoprocessing package and service type.
Gets or sets the maximum number of records that can be returned by the Geoprocessing service.
Gets the unique auto-assigned name for the service.(Inherited from LocalService.)
Gets the path of the package file on which the LocalService is based.(Inherited from LocalService.)
Gets or sets the execution type of the local geoprocessing service.
Gets the local server status.(Inherited from LocalService.)
Gets the Url of the local geoprocessing service.(Overrides LocalServiceUrl.)
Asynchronously starts the local geoprocessing service.(Overrides LocalServiceStartAsync.)
Asynchronously stops this local service instance, and returns a Task object.(Inherited from LocalService.)
Occurs when Status of this local service has changed.(Inherited from LocalService.)
A single local geoprocessing service instance corresponds directly to a geoprocessing package shared from ArcGIS for Desktop. One or more geoprocessing tasks may be exposed by the local geoprocessing service depending on the number of individual tool or script results contained within the geoprocessing package. When starting local geoprocessing services there are a number of properties you must choose values for which are usually determined by the server administrator for online geoprocessing services hosted by ArcGIS for Server.
These properties are: Service execution type: The ServiceType property determines whether the service will run the task asynchronously or synchronously. This affects how the client application you are developing interacts with the runtime local server and gets the result from the task. When a service is set to SynchronousExecute (synchronous) operation, the client waits for the task to finish. Typically, a service that will run tasks synchronously should execute quickly (five seconds or less). A service should be set to use the AsynchronousSubmit (asynchronous) if one or more of that tasks within that service will takes longer to run. When using the SubmitJob mode the client application must periodically ask the server if the task has finished and, if it has finished, get the result. The GeoprocessingServiceType enumeration values which determine the synchronous or asynchronous service operation are called "Execute" and "SubmitJob" to align them with the corresponding methods on the Geoprocessor task API and to differentiate them from the synchronous or asynchronous usage. You must use the method which corresponds to the GeoprocessingServiceType of the local geoprocessing service you are working with. The service mode AsynchronousSubmitWithMapServiceResult will enable you to display the results of the task within a local map service. Maximum number of records returned: The maximum number of results the service can return to a client. Setting this value to a large number means your runtime local server can handle sending a lot of individual records or features to the client application. Whether you choose this pattern depends on the number and complexity of the feature geometries. If you do not want to return any features, set this value to 0 (zero). Typically, you set this value to zero only when you create the service as AsynchronousSubmitWithMapServiceResult. To determine whether the MaxRecords limits has been exceeded you should check the exceeded transfer limit property of the feature set or record set returned by the task. The exceeded transfer limit property will be set to true when the number of records and features of the output parameter exceed the maximum number of records specified by the service. this information is also included in the Messages of GeoprocessingJob returned by the service.
Once you have created a new LocalGeoprocessingService and specified the PackagePath, ServiceType and MaxRecords properties, starting the service via the StartAsync method will populate the Url property. It is this last property, the URL of the local geoprocessing service that you provide a GeoprocessingTask task with in order to interact with the tasks exposed by the service. Additionally you can use the static GetServiceAsyncTask method to instantiate and start a new local geoprocessing service.