public virtual Response Add(PoolAddParameter pool, PoolAddOptions poolAddOptions, CancellationToken cancellationToken = default) { return(RestClient.Add(pool, poolAddOptions, cancellationToken).GetRawResponse()); }
public virtual async Task <Response> AddAsync(PoolAddParameter pool, PoolAddOptions poolAddOptions, CancellationToken cancellationToken = default) { return((await RestClient.AddAsync(pool, poolAddOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse()); }
/// <summary> /// Adds a Pool to the specified Account. /// </summary> /// <remarks> /// When naming Pools, avoid including sensitive information such as user names /// or secret project names. This information may appear in telemetry logs /// accessible to Microsoft Support engineers. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='pool'> /// The Pool to be added. /// </param> /// <param name='poolAddOptions'> /// Additional parameters for the operation /// </param> public static PoolAddHeaders Add(this IPoolOperations operations, PoolAddParameter pool, PoolAddOptions poolAddOptions = default(PoolAddOptions)) { return(operations.AddAsync(pool, poolAddOptions).GetAwaiter().GetResult()); }
/// <summary> /// Adds a Pool to the specified Account. /// </summary> /// <remarks> /// When naming Pools, avoid including sensitive information such as user names /// or secret project names. This information may appear in telemetry logs /// accessible to Microsoft Support engineers. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='pool'> /// The Pool to be added. /// </param> /// <param name='poolAddOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PoolAddHeaders> AddAsync(this IPoolOperations operations, PoolAddParameter pool, PoolAddOptions poolAddOptions = default(PoolAddOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddWithHttpMessagesAsync(pool, poolAddOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Headers); } }
/// <summary> /// Adds a pool to the specified account. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='pool'> /// The pool to be added. /// </param> /// <param name='poolAddOptions'> /// Additional parameters for the operation /// </param> public static PoolAddHeaders Add(this IPoolOperations operations, PoolAddParameter pool, PoolAddOptions poolAddOptions = default(PoolAddOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IPoolOperations)s).AddAsync(pool, poolAddOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }