/// <summary> /// Returns the content of the specified Task file. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The ID of the Job that contains the Task. /// </param> /// <param name='taskId'> /// The ID of the Task whose file you want to retrieve. /// </param> /// <param name='filePath'> /// The path to the Task file that you want to get the content of. /// </param> /// <param name='fileGetFromTaskOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Stream> GetFromTaskAsync(this IFileOperations operations, string jobId, string taskId, string filePath, FileGetFromTaskOptions fileGetFromTaskOptions = default(FileGetFromTaskOptions), CancellationToken cancellationToken = default(CancellationToken)) { var _result = await operations.GetFromTaskWithHttpMessagesAsync(jobId, taskId, filePath, fileGetFromTaskOptions, null, cancellationToken).ConfigureAwait(false); _result.Request.Dispose(); return(_result.Body); }
/// <summary> /// Returns the content of the specified Task file. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The ID of the Job that contains the Task. /// </param> /// <param name='taskId'> /// The ID of the Task whose file you want to retrieve. /// </param> /// <param name='filePath'> /// The path to the Task file that you want to get the content of. /// </param> /// <param name='fileGetFromTaskOptions'> /// Additional parameters for the operation /// </param> public static Stream GetFromTask(this IFileOperations operations, string jobId, string taskId, string filePath, FileGetFromTaskOptions fileGetFromTaskOptions = default(FileGetFromTaskOptions)) { return(operations.GetFromTaskAsync(jobId, taskId, filePath, fileGetFromTaskOptions).GetAwaiter().GetResult()); }
public virtual Response <Stream> GetFromTask(string jobId, string taskId, string filePath, FileGetFromTaskOptions fileGetFromTaskOptions, CancellationToken cancellationToken = default) { return(RestClient.GetFromTask(jobId, taskId, filePath, fileGetFromTaskOptions, cancellationToken)); }
/// <summary> /// Returns the content of the specified task file. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='jobId'> /// The id of the job that contains the task. /// </param> /// <param name='taskId'> /// The id of the task whose file you want to retrieve. /// </param> /// <param name='fileName'> /// The path to the task file that you want to get the content of. /// </param> /// <param name='fileGetFromTaskOptions'> /// Additional parameters for the operation /// </param> public static System.IO.Stream GetFromTask(this IFileOperations operations, string jobId, string taskId, string fileName, FileGetFromTaskOptions fileGetFromTaskOptions = default(FileGetFromTaskOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFileOperations)s).GetFromTaskAsync(jobId, taskId, fileName, fileGetFromTaskOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public virtual async Task <Response <Stream> > GetFromTaskAsync(string jobId, string taskId, string filePath, FileGetFromTaskOptions fileGetFromTaskOptions, CancellationToken cancellationToken = default) { return(await RestClient.GetFromTaskAsync(jobId, taskId, filePath, fileGetFromTaskOptions, cancellationToken).ConfigureAwait(false)); }