/// <summary> /// Returns the content of the specified Compute Node file. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the Pool that contains the Compute Node. /// </param> /// <param name='nodeId'> /// The ID of the Compute Node that contains the file. /// </param> /// <param name='filePath'> /// The path to the Compute Node file that you want to get the content of. /// </param> /// <param name='fileGetFromComputeNodeOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Stream> GetFromComputeNodeAsync(this IFileOperations operations, string poolId, string nodeId, string filePath, FileGetFromComputeNodeOptions fileGetFromComputeNodeOptions = default(FileGetFromComputeNodeOptions), CancellationToken cancellationToken = default(CancellationToken)) { var _result = await operations.GetFromComputeNodeWithHttpMessagesAsync(poolId, nodeId, filePath, fileGetFromComputeNodeOptions, null, cancellationToken).ConfigureAwait(false); _result.Request.Dispose(); return(_result.Body); }
/// <summary> /// Returns the content of the specified Compute Node file. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the Pool that contains the Compute Node. /// </param> /// <param name='nodeId'> /// The ID of the Compute Node that contains the file. /// </param> /// <param name='filePath'> /// The path to the Compute Node file that you want to get the content of. /// </param> /// <param name='fileGetFromComputeNodeOptions'> /// Additional parameters for the operation /// </param> public static Stream GetFromComputeNode(this IFileOperations operations, string poolId, string nodeId, string filePath, FileGetFromComputeNodeOptions fileGetFromComputeNodeOptions = default(FileGetFromComputeNodeOptions)) { return(operations.GetFromComputeNodeAsync(poolId, nodeId, filePath, fileGetFromComputeNodeOptions).GetAwaiter().GetResult()); }
public virtual Response <Stream> GetFromComputeNode(string poolId, string nodeId, string filePath, FileGetFromComputeNodeOptions fileGetFromComputeNodeOptions, CancellationToken cancellationToken = default) { return(RestClient.GetFromComputeNode(poolId, nodeId, filePath, fileGetFromComputeNodeOptions, cancellationToken)); }
/// <summary> /// Returns the content of the specified task file. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The id of the pool that contains the compute node. /// </param> /// <param name='nodeId'> /// The id of the compute node that contains the file. /// </param> /// <param name='fileName'> /// The path to the task file that you want to get the content of. /// </param> /// <param name='fileGetFromComputeNodeOptions'> /// Additional parameters for the operation /// </param> public static System.IO.Stream GetFromComputeNode(this IFileOperations operations, string poolId, string nodeId, string fileName, FileGetFromComputeNodeOptions fileGetFromComputeNodeOptions = default(FileGetFromComputeNodeOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFileOperations)s).GetFromComputeNodeAsync(poolId, nodeId, fileName, fileGetFromComputeNodeOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public virtual async Task <Response <Stream> > GetFromComputeNodeAsync(string poolId, string nodeId, string filePath, FileGetFromComputeNodeOptions fileGetFromComputeNodeOptions, CancellationToken cancellationToken = default) { return(await RestClient.GetFromComputeNodeAsync(poolId, nodeId, filePath, fileGetFromComputeNodeOptions, cancellationToken).ConfigureAwait(false)); }