ArcGIS Runtime SDK for WPF - Library Reference
GeoprocessingTaskInfo Class
Members  Example  See Also 
ESRI.ArcGIS.Client.Local Namespace : GeoprocessingTaskInfo Class

The GeoprocessingTaskInfo class provides information on each task inside a Geoprocessing Service.

Object Model

GeoprocessingTaskInfo Class

Syntax

Visual Basic (Declaration) 
Public Class GeoprocessingTaskInfo 
C# 
public class GeoprocessingTaskInfo 

Remarks

This class provides a convenient way to quickly obtain task information that is required for the execution of geoprocessing tasks such as the Name property and importantly provides access to the Parameter list.

Example

This example shows how to access the GeoprocessingTaskInfo for the first task within a Local Geoprocessing Service.
C#Copy Code
// Create a new LocalGeoprocessing service of synchronous execution type.
LocalGeoprocessingService gpService
    = new LocalGeoprocessingService("Path to geoprocessing package", GPServiceType.Execute);
    
gpService.StartAsync(delegateService =>
    {
        // The name of the task.
        string taskName = gpService.Tasks[0].Name;
        
        // The display name of task.
        string taskDisplayName = gpService.Tasks[0].DisplayName;
            
        // The category of the task.
        string taskCategory = gpService.Tasks[0].Category;
        
        // The execution type (synchronous / asynchronous) of the task.
        GPServiceType taskGpServiceType = gpService.Tasks[0].ExecutionType;
        
        // The Url of the task. This is used in conjunction with the Geoprocessor task.
        string taskUrl = gpService.Tasks[0].Url;
        
        // The Url of the help for the task.
        string taskHelpUrl = gpService.Tasks[0].HelpUrl;
        
        // Instantiate a new Geoprocessor task with the Url.
        ESRI.ArcGIS.Client.Tasks.Geoprocessor geoprocessorTask
            = new ESRI.ArcGIS.Client.Tasks.Geoprocessor(gpService.Tasks[0].Url);
    });
VB.NETCopy Code
' Create a new LocalGeoprocessing service of synchronous execution type.
Dim gpService As New LocalGeoprocessingService("Path to geoprocessing package", GPServiceType.Execute)
gpService.StartAsync(Function(delegateService)
    ' The name of the task.
    Dim taskName As String = gpService.Tasks(0).Name
    
    ' The display name of the task.
    Dim taskDisplayName As String = gpService.Tasks(0).DisplayName
    
    ' The category of the task.
    Dim taskCategory As String = gpService.Tasks(0).Category
    
    ' The execution type (synchronous / asynchronous) of the task.
    Dim taskGpServiceType As GPServiceType = gpService.Tasks(0).ExecutionType
       
    ' The Url of the task. 
    ' This is used in conjunction with the Geoprocessor task.
    Dim taskUrl As String = gpService.Tasks(0).Url
    
    ' The Url of the help for this task.
    Dim taskHelpUrl As String = gpService.Tasks(0).HelpUrl
    
    ' Instantiate a new Geoprocessor task with the Url.
    Dim geoprocessorTask As New ESRI.ArcGIS.Client.Tasks.Geoprocessor(gpService.Tasks(0).Url)
    
End Function)

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.Client.Local.GeoprocessingTaskInfo

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.