/// <summary> /// Returns information about one operation on a given operation Guid. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IDatabaseOperationOperations. /// </param> /// <param name='serverName'> /// The name of the SQL Server on which the operation was executed. /// </param> /// <param name='operationGuid'> /// The Guid of the SQL Server database operation to be obtained. /// </param> /// <returns> /// Response containing the database operation for a given operation /// Guid. /// </returns> public static DatabaseOperationGetResponse Get(this IDatabaseOperationOperations operations, string serverName, string operationGuid) { try { return(operations.GetAsync(serverName, operationGuid).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Returns information about one operation on a given operation Guid. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IDatabaseOperationOperations. /// </param> /// <param name='serverName'> /// Required. The name of the SQL Server on which the operation was /// executed. /// </param> /// <param name='operationGuid'> /// Required. The Guid of the SQL Server database operation to be /// obtained. /// </param> /// <returns> /// Response containing the database operation for a given operation /// Guid. /// </returns> public static Task <DatabaseOperationGetResponse> GetAsync(this IDatabaseOperationOperations operations, string serverName, string operationGuid) { return(operations.GetAsync(serverName, operationGuid, CancellationToken.None)); }