Exemplo n.º 1
0
 /// <summary>
 /// Enables the specified job, allowing new tasks to run.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job to enable.
 /// </param>
 /// <param name='jobEnableOptions'>
 /// Additional parameters for the operation
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <JobEnableHeaders> EnableAsync(this IJobOperations operations, string jobId, JobEnableOptions jobEnableOptions = default(JobEnableOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.EnableWithHttpMessagesAsync(jobId, jobEnableOptions, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Headers);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Enables the specified job, allowing new tasks to run.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The id of the job to enable.
 /// </param>
 /// <param name='jobEnableOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static JobEnableHeaders Enable(this IJobOperations operations, string jobId, JobEnableOptions jobEnableOptions = default(JobEnableOptions))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IJobOperations)s).EnableAsync(jobId, jobEnableOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemplo n.º 3
0
 public virtual Response Enable(string jobId, JobEnableOptions jobEnableOptions, CancellationToken cancellationToken = default)
 {
     return(RestClient.Enable(jobId, jobEnableOptions, cancellationToken).GetRawResponse());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Enables the specified Job, allowing new Tasks to run.
 /// </summary>
 /// <remarks>
 /// When you call this API, the Batch service sets a disabled Job to the
 /// enabling state. After the this operation is completed, the Job moves to the
 /// active state, and scheduling of new Tasks under the Job resumes. The Batch
 /// service does not allow a Task to remain in the active state for more than
 /// 180 days. Therefore, if you enable a Job containing active Tasks which were
 /// added more than 180 days ago, those Tasks will not run.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='jobId'>
 /// The ID of the Job to enable.
 /// </param>
 /// <param name='jobEnableOptions'>
 /// Additional parameters for the operation
 /// </param>
 public static JobEnableHeaders Enable(this IJobOperations operations, string jobId, JobEnableOptions jobEnableOptions = default(JobEnableOptions))
 {
     return(operations.EnableAsync(jobId, jobEnableOptions).GetAwaiter().GetResult());
 }
Exemplo n.º 5
0
 public virtual async Task <Response> EnableAsync(string jobId, JobEnableOptions jobEnableOptions, CancellationToken cancellationToken = default)
 {
     return((await RestClient.EnableAsync(jobId, jobEnableOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse());
 }