/// <summary> /// Returns the list database operations for a given server. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IDatabaseOperationOperations. /// </param> /// <param name='serverName'> /// The name of the SQL Server to be queried. /// </param> /// <returns> /// Response containing the list of database operations for a given /// server or database. /// </returns> public static DatabaseOperationListResponse ListByServer(this IDatabaseOperationOperations operations, string serverName) { try { return(operations.ListByServerAsync(serverName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Returns the list database operations for a given server. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Sql.IDatabaseOperationOperations. /// </param> /// <param name='serverName'> /// Required. The name of the SQL Server to be queried. /// </param> /// <returns> /// Response containing the list of database operations for a given /// server or database. /// </returns> public static Task <DatabaseOperationListResponse> ListByServerAsync(this IDatabaseOperationOperations operations, string serverName) { return(operations.ListByServerAsync(serverName, CancellationToken.None)); }