/// <summary> /// Gets all the available express route service providers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ExpressRouteServiceProvider> > ListAsync(this IExpressRouteServiceProvidersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets all the available express route service providers. /// </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 <ExpressRouteServiceProvider> ListNext(this IExpressRouteServiceProvidersOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// The List ExpressRouteServiceProvider opertion retrieves all the available /// ExpressRouteServiceProviders. /// </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 <ExpressRouteServiceProvider> > ListNextAsync(this IExpressRouteServiceProvidersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { AzureOperationResponse <IPage <ExpressRouteServiceProvider> > result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <summary> /// Gets all the available express route service providers. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <ExpressRouteServiceProvider> List(this IExpressRouteServiceProvidersOperations operations) { return(operations.ListAsync().GetAwaiter().GetResult()); }
/// <summary> /// The List ExpressRouteServiceProvider opertion retrieves all the available /// ExpressRouteServiceProviders. /// </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 <ExpressRouteServiceProvider> ListNext(this IExpressRouteServiceProvidersOperations operations, string nextPageLink) { return(Task.Factory.StartNew(s => ((IExpressRouteServiceProvidersOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }