I tried the following code but only the first call of GetResultDataAsync completes(message box appears for the parameter called), therefore you cannot "execute sequentially GetResultDataAsync". I switched the order of the GetResultDataAsync, "out_directions" first and then "out_stops" second and the correct message box appears for the called parameter but I cannot get both to appear. Am I doing something wrong or is this not possible? void geoprocessorTask_JobCompleted(object sender, JobInfoEventArgs e)
{
Geoprocessor geoprocessorTask = sender as Geoprocessor;
geoprocessorTask.GetResultDataCompleted += new EventHandler<GPParameterEventArgs>(geoprocessorTask_GetResultDataCompleted);
geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "out_stops");
geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "out_directions");
}
void geoprocessorTask_GetResultDataCompleted(object sender, GPParameterEventArgs e)
{
if (e.Parameter.Name == "out_stops" )
{
MessageBox.Show("out_stops");
}
// For Out Direction
// if (e.Parameter is GPFeatureRecordSetLayer)
if (e.Parameter.Name == "out_directions")
{
MessageBox.Show("out_directions");
}
}