/// <summary> /// Gets information about the specified job. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The id of the job. /// </param> /// <param name='jobGetOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <CloudJob> GetAsync(this IJobOperations operations, string jobId, JobGetOptions jobGetOptions = default(JobGetOptions), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(jobId, jobGetOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets information about the specified job. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The id of the job. /// </param> /// <param name='jobGetOptions'> /// Additional parameters for the operation /// </param> public static CloudJob Get(this IJobOperations operations, string jobId, JobGetOptions jobGetOptions = default(JobGetOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IJobOperations)s).GetAsync(jobId, jobGetOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public virtual Response <CloudJob> Get(string jobId, JobGetOptions jobGetOptions, CancellationToken cancellationToken = default) { return(RestClient.Get(jobId, jobGetOptions, cancellationToken)); }
/// <summary> /// Gets information about the specified Job. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The ID of the Job. /// </param> /// <param name='jobGetOptions'> /// Additional parameters for the operation /// </param> public static CloudJob Get(this IJobOperations operations, string jobId, JobGetOptions jobGetOptions = default(JobGetOptions)) { return(operations.GetAsync(jobId, jobGetOptions).GetAwaiter().GetResult()); }
public virtual async Task <Response <CloudJob> > GetAsync(string jobId, JobGetOptions jobGetOptions, CancellationToken cancellationToken = default) { return(await RestClient.GetAsync(jobId, jobGetOptions, cancellationToken).ConfigureAwait(false)); }