Visual Basic (Declaration) | |
---|---|
Public Class GeoprocessingTaskParameters |
C# | |
---|---|
public class GeoprocessingTaskParameters |
This class provides a convenient way to quickly obtain parameter information and to confirm that parameters that you specify for executing a geoprocessing task are correct.
This example shows how to access the GeoprocessingTaskParameters within a GeoprocessingTask.
C# | Copy Code |
---|---|
// Create a new LocalGeoprocessing service of synchronous execution type. LocalGeoprocessingService gpService = new LocalGeoprocessingService("Path to geoprocessing package", GPServiceType.Execute); // Asynchronously start the service then check the parameter information. gpService.StartAsync(delegateService => { // Check the number of parameters of the first task (tool) in the service. int numberOfServiceParameters = gpService.Tasks[0].Parameters.Count; // Check the data type of the first parameter e.g. GPString. GPParameterDataType dataTypeOfFirstParameter = gpService.Tasks[0].Parameters[0].DataType; // Check the direction of the first parameter: input; or output. GPParameterDirection directionofFirstParameter = gpService.Tasks[0].Parameters[0].Direction; // Check the parameter type of the first parameter: required; optional; or derived (output). GPParameterType parameterTypeOfFirstParameter = gpService.Tasks[0].Parameters[0].ParameterType; }); |
VB.NET | Copy Code |
---|---|
' Create a new LocalGeoprocessing service of synchronous execution type. Dim gpService As New LocalGeoprocessingService("Path to geoprocessing package", GPServiceType.Execute) ' Asynchronously start the service then check the parameter information. gpService.StartAsync(Function(delegateService) ' Check the number of parameters of the first task (tool) in the service. Dim numberOfServiceParameters As Integer = gpService.Tasks(0).Parameters.Count ' Check the data type of the first parameter e.g. GPString. Dim dataTypeOfFirstParameter As GPParameterDataType = gpService.Tasks(0).Parameters(0).DataType ' Check the direction of the first parameter: input; or output. Dim directionofFirstParameter As GPParameterDirection = gpService.Tasks(0).Parameters(0).Direction ' Check the parameter type of the first parameter: required; optional; or derived (output). Dim parameterTypeOfFirstParameter As GPParameterType = gpService.Tasks(0).Parameters(0).ParameterType End Function) |
System.Object
ESRI.ArcGIS.Client.Local.GeoprocessingTaskParameters
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8