/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.HDInsight.IHDInsightManagementClient. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// The azure async operation response. /// </returns> public static OperationResource GetLongRunningOperationStatus(this IHDInsightManagementClient operations, string operationStatusLink) { return(Task.Factory.StartNew((object s) => { return ((IHDInsightManagementClient)s).GetLongRunningOperationStatusAsync(operationStatusLink); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The Get Operation Status operation returns the status of the /// specified operation. After calling an asynchronous operation, you /// can call Get Operation Status to determine whether the operation /// has succeeded, failed, or is still in progress. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.HDInsight.IHDInsightManagementClient. /// </param> /// <param name='operationStatusLink'> /// Required. Location value returned by the Begin operation. /// </param> /// <returns> /// The cluster long running operation response. /// </returns> public static Task <HDInsightLongRunningOperationResponse> GetLongRunningOperationStatusAsync(this IHDInsightManagementClient operations, string operationStatusLink) { return(operations.GetLongRunningOperationStatusAsync(operationStatusLink, CancellationToken.None)); }