/// <summary>
 /// The Get Task Status returns the status of the specified task id.
 /// After calling an asynchronous task, you can call Get Task Status
 /// to determine whether the task has succeeded, failed, or is still
 /// in progress.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IStorSimpleManagementClient.
 /// </param>
 /// <param name='taskId'>
 /// Required. The task Id for the request you wish to track.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static TaskStatusInfo GetOperationStatus(this IStorSimpleManagementClient operations, string taskId)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IStorSimpleManagementClient)s).GetOperationStatusAsync(taskId);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// The Get Task Status returns the status of the specified task id.
 /// After calling an asynchronous task, you can call Get Task Status
 /// to determine whether the task has succeeded, failed, or is still
 /// in progress.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IStorSimpleManagementClient.
 /// </param>
 /// <param name='taskId'>
 /// Required. The task Id for the request you wish to track.
 /// </param>
 /// <returns>
 /// Info about the async task
 /// </returns>
 public static Task <TaskStatusInfo> GetOperationStatusAsync(this IStorSimpleManagementClient operations, string taskId)
 {
     return(operations.GetOperationStatusAsync(taskId, CancellationToken.None));
 }