/// <summary> /// Deletes a job collection. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Scheduler.IJobCollectionOperations. /// </param> /// <param name='cloudServiceName'> /// The name of the cloud service. /// </param> /// <param name='jobCollectionName'> /// The name of the job collection to delete. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse BeginDeleting(this IJobCollectionOperations operations, string cloudServiceName, string jobCollectionName) { try { return(operations.BeginDeletingAsync(cloudServiceName, jobCollectionName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Deletes a job collection. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Scheduler.IJobCollectionOperations. /// </param> /// <param name='cloudServiceName'> /// Required. The name of the cloud service. /// </param> /// <param name='jobCollectionName'> /// Required. The name of the job collection to delete. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> BeginDeletingAsync(this IJobCollectionOperations operations, string cloudServiceName, string jobCollectionName) { return(operations.BeginDeletingAsync(cloudServiceName, jobCollectionName, CancellationToken.None)); }