public virtual Response <CloudPool> Get(string poolId, PoolGetOptions poolGetOptions, CancellationToken cancellationToken = default) { return(RestClient.Get(poolId, poolGetOptions, cancellationToken)); }
public virtual async Task <Response <CloudPool> > GetAsync(string poolId, PoolGetOptions poolGetOptions, CancellationToken cancellationToken = default) { return(await RestClient.GetAsync(poolId, poolGetOptions, cancellationToken).ConfigureAwait(false)); }
/// <summary> /// Gets information about the specified Pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the Pool to get. /// </param> /// <param name='poolGetOptions'> /// Additional parameters for the operation /// </param> public static CloudPool Get(this IPoolOperations operations, string poolId, PoolGetOptions poolGetOptions = default(PoolGetOptions)) { return(operations.GetAsync(poolId, poolGetOptions).GetAwaiter().GetResult()); }
/// <summary> /// Gets information about the specified Pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The ID of the Pool to get. /// </param> /// <param name='poolGetOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CloudPool> GetAsync(this IPoolOperations operations, string poolId, PoolGetOptions poolGetOptions = default(PoolGetOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(poolId, poolGetOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets information about the specified pool. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='poolId'> /// The id of the pool to get. /// </param> /// <param name='poolGetOptions'> /// Additional parameters for the operation /// </param> public static CloudPool Get(this IPoolOperations operations, string poolId, PoolGetOptions poolGetOptions = default(PoolGetOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IPoolOperations)s).GetAsync(poolId, poolGetOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }