public virtual async Task <Response> ExistsAsync(string poolId, PoolExistsOptions poolExistsOptions, CancellationToken cancellationToken = default) { return((await RestClient.ExistsAsync(poolId, poolExistsOptions, cancellationToken).ConfigureAwait(false)).GetRawResponse()); }
public virtual Response Exists(string poolId, PoolExistsOptions poolExistsOptions, CancellationToken cancellationToken = default) { return(RestClient.Exists(poolId, poolExistsOptions, cancellationToken).GetRawResponse()); }
/// <summary> /// Gets basic properties of a 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='poolExistsOptions'> /// Additional parameters for the operation /// </param> public static bool Exists(this IPoolOperations operations, string poolId, PoolExistsOptions poolExistsOptions = default(PoolExistsOptions)) { return(operations.ExistsAsync(poolId, poolExistsOptions).GetAwaiter().GetResult()); }
/// <summary> /// Gets basic properties of a 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='poolExistsOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <bool> ExistsAsync(this IPoolOperations operations, string poolId, PoolExistsOptions poolExistsOptions = default(PoolExistsOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ExistsWithHttpMessagesAsync(poolId, poolExistsOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets basic properties of a 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='poolExistsOptions'> /// Additional parameters for the operation /// </param> public static bool Exists(this IPoolOperations operations, string poolId, PoolExistsOptions poolExistsOptions = default(PoolExistsOptions)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IPoolOperations)s).ExistsAsync(poolId, poolExistsOptions), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }