/// <summary> /// Creates a protection container /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionContainerOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric name. /// </param> /// <param name='protectionContainerName'> /// Required. Protection container name. /// </param> /// <param name='input'> /// Required. Create protection container input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static LongRunningOperationResponse BeginCreating(this IProtectionContainerOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInput input, CustomRequestHeaders customRequestHeaders) { return Task.Factory.StartNew((object s) => { return ((IProtectionContainerOperations)s).BeginCreatingAsync(fabricName, protectionContainerName, input, customRequestHeaders); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Creates a protection container /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.SiteRecovery.IProtectionContainerOperations. /// </param> /// <param name='fabricName'> /// Required. Fabric name. /// </param> /// <param name='protectionContainerName'> /// Required. Protection container name. /// </param> /// <param name='input'> /// Required. Create protection container input. /// </param> /// <param name='customRequestHeaders'> /// Optional. Request header parameters. /// </param> /// <returns> /// A standard service response for long running operations. /// </returns> public static Task<LongRunningOperationResponse> BeginCreatingAsync(this IProtectionContainerOperations operations, string fabricName, string protectionContainerName, CreateProtectionContainerInput input, CustomRequestHeaders customRequestHeaders) { return operations.BeginCreatingAsync(fabricName, protectionContainerName, input, customRequestHeaders, CancellationToken.None); }