public DeleteJob ( BatchAccountContext context, string jobId, IEnumerable |
||
context | BatchAccountContext | The account to use. |
jobId | string | The id of the job to delete. |
additionBehaviors | IEnumerable |
Additional client behaviors to perform. |
return | void |
public void DeleteJob(BatchAccountContext context, string jobId, IEnumerable<BatchClientBehavior> additionBehaviors = null)
{
if (string.IsNullOrWhiteSpace(jobId))
{
throw new ArgumentNullException("jobId");
}
JobOperations jobOperations = context.BatchOMClient.JobOperations;
jobOperations.DeleteJob(jobId, additionBehaviors);
}
/// <summary> /// Deletes a job used in a Scenario test. /// </summary> public static void DeleteJob(BatchController controller, BatchAccountContext context, string jobId) { RequestInterceptor interceptor = CreateHttpRecordingInterceptor(); BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor }; BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); client.DeleteJob(context, jobId, behaviors); }