/// <summary> /// The Create Storage Account operation creates a new storage account /// in Windows Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations. /// </param> /// <param name='parameters'> /// Parameters supplied to the Create Storage Account operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse BeginCreating(this IStorageAccountOperations operations, StorageAccountCreateParameters parameters) { try { return(operations.BeginCreatingAsync(parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Begin Creating Storage Account operation creates a new storage /// account in Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Begin Creating Storage Account /// operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <AzureOperationResponse> BeginCreatingAsync(this IStorageAccountOperations operations, StorageAccountCreateParameters parameters) { return(operations.BeginCreatingAsync(parameters, CancellationToken.None)); }