/// <summary> /// Disables a Job Schedule. /// </summary> /// <remarks> /// No new Jobs will be created until the Job Schedule is enabled again. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobScheduleId'> /// The ID of the Job Schedule to disable. /// </param> /// <param name='jobScheduleDisableOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <JobScheduleDisableHeaders> DisableAsync(this IJobScheduleOperations operations, string jobScheduleId, JobScheduleDisableOptions jobScheduleDisableOptions = default(JobScheduleDisableOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DisableWithHttpMessagesAsync(jobScheduleId, jobScheduleDisableOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Disables a Job Schedule. /// </summary> /// <remarks> /// No new Jobs will be created until the Job Schedule is enabled again. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobScheduleId'> /// The ID of the Job Schedule to disable. /// </param> /// <param name='jobScheduleDisableOptions'> /// Additional parameters for the operation /// </param> public static JobScheduleDisableHeaders Disable(this IJobScheduleOperations operations, string jobScheduleId, JobScheduleDisableOptions jobScheduleDisableOptions = default(JobScheduleDisableOptions)) { return(operations.DisableAsync(jobScheduleId, jobScheduleDisableOptions).GetAwaiter().GetResult()); }
public virtual async Task <Response> DisableAsync(string jobScheduleId, JobScheduleDisableOptions jobScheduleDisableOptions, CancellationToken cancellationToken = default) { return((await RestClient.DisableAsync(jobScheduleId, jobScheduleDisableOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse()); }
public virtual Response Disable(string jobScheduleId, JobScheduleDisableOptions jobScheduleDisableOptions, CancellationToken cancellationToken = default) { return(RestClient.Disable(jobScheduleId, jobScheduleDisableOptions, cancellationToken).GetRawResponse()); }
/// <summary> /// Disables a job schedule. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobScheduleId'> /// The id of the job schedule to disable. /// </param> /// <param name='jobScheduleDisableOptions'> /// Additional parameters for the operation /// </param> public static JobScheduleDisableHeaders Disable(this IJobScheduleOperations operations, string jobScheduleId, JobScheduleDisableOptions jobScheduleDisableOptions = default(JobScheduleDisableOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IJobScheduleOperations)s).DisableAsync(jobScheduleId, jobScheduleDisableOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }