/// <summary> /// List disks in a given user profile. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='userName'> /// The name of the user profile. /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Disk> > ListAsync(this IDisksOperations operations, string resourceGroupName, string labName, string userName, ODataQuery <Disk> odataQuery = default(ODataQuery <Disk>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, userName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all the disks under a subscription. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DiskInner> > ListAsync(this IDisksOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns a list of disks. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='location'> /// Location of the resource. /// </param> /// <param name='userSubscriptionId'> /// User Subscription Id which the resource belongs to. /// </param> /// <param name='status'> /// The parameters of disk state. /// </param> /// <param name='sharePath'> /// The source share which the resource belongs to. /// </param> /// <param name='count'> /// The maximum number of disks to return. /// </param> /// <param name='start'> /// The start index of disks in query. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <Disk> > ListAsync(this IDisksOperations operations, string location, string userSubscriptionId = default(string), string status = default(string), string sharePath = default(string), int?count = default(int?), int?start = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(location, userSubscriptionId, status, sharePath, count, start, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }