/// <summary> /// Lists all of the files in Task directories on the specified Compute Node. /// </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 whose files you want to list. /// </param> /// <param name='recursive'> /// Whether to list children of a directory. /// </param> /// <param name='fileListFromComputeNodeOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <NodeFile> > ListFromComputeNodeAsync(this IFileOperations operations, string poolId, string nodeId, bool?recursive = default(bool?), FileListFromComputeNodeOptions fileListFromComputeNodeOptions = default(FileListFromComputeNodeOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListFromComputeNodeWithHttpMessagesAsync(poolId, nodeId, recursive, fileListFromComputeNodeOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all of the files in task directories on the specified compute node. /// </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 whose files you want to list. /// </param> /// <param name='recursive'> /// Whether to list children of a directory. /// </param> /// <param name='fileListFromComputeNodeOptions'> /// Additional parameters for the operation /// </param> public static Microsoft.Rest.Azure.IPage <NodeFile> ListFromComputeNode(this IFileOperations operations, string poolId, string nodeId, bool?recursive = default(bool?), FileListFromComputeNodeOptions fileListFromComputeNodeOptions = default(FileListFromComputeNodeOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IFileOperations)s).ListFromComputeNodeAsync(poolId, nodeId, recursive, fileListFromComputeNodeOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Lists all of the files in Task directories on the specified Compute Node. /// </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 whose files you want to list. /// </param> /// <param name='recursive'> /// Whether to list children of a directory. /// </param> /// <param name='fileListFromComputeNodeOptions'> /// Additional parameters for the operation /// </param> public static IPage <NodeFile> ListFromComputeNode(this IFileOperations operations, string poolId, string nodeId, bool?recursive = default(bool?), FileListFromComputeNodeOptions fileListFromComputeNodeOptions = default(FileListFromComputeNodeOptions)) { return(operations.ListFromComputeNodeAsync(poolId, nodeId, recursive, fileListFromComputeNodeOptions).GetAwaiter().GetResult()); }
public virtual Pageable <NodeFile> ListFromComputeNode(string poolId, string nodeId, bool?recursive, FileListFromComputeNodeOptions fileListFromComputeNodeOptions, CancellationToken cancellationToken = default) { if (poolId == null) { throw new ArgumentNullException(nameof(poolId)); } if (nodeId == null) { throw new ArgumentNullException(nameof(nodeId)); } Page <NodeFile> FirstPageFunc(int?pageSizeHint) { var response = RestClient.ListFromComputeNode(poolId, nodeId, recursive, fileListFromComputeNodeOptions, cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.OdataNextLink, response.GetRawResponse())); } Page <NodeFile> NextPageFunc(string nextLink, int?pageSizeHint) { var response = RestClient.ListFromComputeNodeNextPage(nextLink, poolId, nodeId, recursive, fileListFromComputeNodeOptions, cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.OdataNextLink, response.GetRawResponse())); } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }