/// <summary> /// Gets a list of all roles in a cloud service. Use nextLink property in the /// response to get the next page of roles. Do this till nextLink is null to /// fetch all the roles. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// </param> /// <param name='cloudServiceName'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <CloudServiceRole> > ListAsync(this ICloudServiceRolesOperations operations, string resourceGroupName, string cloudServiceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, cloudServiceName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of all roles in a cloud service. Use nextLink property in the /// response to get the next page of roles. Do this till nextLink is null to /// fetch all the roles. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <CloudServiceRole> > ListNextAsync(this ICloudServiceRolesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of all roles in a cloud service. Use nextLink property in the /// response to get the next page of roles. Do this till nextLink is null to /// fetch all the roles. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// </param> /// <param name='cloudServiceName'> /// </param> public static IPage <CloudServiceRole> List(this ICloudServiceRolesOperations operations, string resourceGroupName, string cloudServiceName) { return(operations.ListAsync(resourceGroupName, cloudServiceName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of all roles in a cloud service. Use nextLink property in the /// response to get the next page of roles. Do this till nextLink is null to /// fetch all the roles. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <CloudServiceRole> ListNext(this ICloudServiceRolesOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }