ArcGIS Runtime SDK for WPF - Library Reference
InitializeWithLocalServiceAsync Method
See Also 
ESRI.ArcGIS.Client.Tasks Namespace > GeoprocessorLocalExtensions Class : InitializeWithLocalServiceAsync Method

geoprocessor
The Geoprocessor task to initialize.
path
A System.String representing the path to a geoprocessing package (.gpk).
toolname
A System.String representing the name of the tool within the package.
gpServiceType
A ESRI.ArcGIS.Client.Local.GPServiceType representing the required type of the local geoprocessing service: synchronous, asynchronous or asynchronous with map server result.
callback
An Action delegate to support inline event handling.
Asynchronously initializes a Geoprocessor task instance with a UrlGeoprocessingService based on the provided path to a geoprocessing package (.gpk).

Syntax

Visual Basic (Declaration) 
Public Shared Sub InitializeWithLocalServiceAsync( _
   ByVal geoprocessor As Geoprocessor, _
   ByVal path As String, _
   ByVal toolname As String, _
   ByVal gpServiceType As GPServiceType, _
   ByVal callback As Action(Of LocalGeoprocessingService) _
) 
C# 
public static void InitializeWithLocalServiceAsync( 
   Geoprocessor geoprocessor,
   string path,
   string toolname,
   GPServiceType gpServiceType,
   Action<LocalGeoprocessingService> callback
)

Remarks

This method will reuse an existing local geoprocessing service if one exists with the same properties or start a new one if none are found on the runtime local server.

Parameters

geoprocessor
The Geoprocessor task to initialize.
path
A System.String representing the path to a geoprocessing package (.gpk).
toolname
A System.String representing the name of the tool within the package.
gpServiceType
A ESRI.ArcGIS.Client.Local.GPServiceType representing the required type of the local geoprocessing service: synchronous, asynchronous or asynchronous with map server result.
callback
An Action delegate to support inline event handling.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.