Exemple #1
0
 /// <summary>
 /// Gets information about the specified Task.
 /// </summary>
 /// <remarks>
 /// For multi-instance Tasks, information such as affinityId, executionInfo and
 /// nodeInfo refer to the primary Task. Use the list subtasks API to retrieve
 /// information about subtasks.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The ID of the Job that contains the Task.
 /// </param>
 /// <param name='taskId'>
 /// The ID of the Task to get information about.
 /// </param>
 /// <param name='taskGetOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static CloudTask Get(this ITaskOperations operations, string jobId, string taskId, TaskGetOptions taskGetOptions = default(TaskGetOptions))
 {
     return(operations.GetAsync(jobId, taskId, taskGetOptions).GetAwaiter().GetResult());
 }
Exemple #2
0
 /// <summary>
 /// Gets information about the specified Task.
 /// </summary>
 /// <remarks>
 /// For multi-instance Tasks, information such as affinityId, executionInfo and
 /// nodeInfo refer to the primary Task. Use the list subtasks API to retrieve
 /// information about subtasks.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The ID of the Job that contains the Task.
 /// </param>
 /// <param name='taskId'>
 /// The ID of the Task to get information about.
 /// </param>
 /// <param name='taskGetOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CloudTask> GetAsync(this ITaskOperations operations, string jobId, string taskId, TaskGetOptions taskGetOptions = default(TaskGetOptions), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(jobId, taskId, taskGetOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Gets information about the specified task.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job that contains the task.
 /// </param>
 /// <param name='taskId'>
 /// The id of the task to get information about.
 /// </param>
 /// <param name='taskGetOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static CloudTask Get(this ITaskOperations operations, string jobId, string taskId, TaskGetOptions taskGetOptions = default(TaskGetOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((ITaskOperations)s).GetAsync(jobId, taskId, taskGetOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }