/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Cart> GetCartAsync(this IASPNETCoreApi operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetCartWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='product'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Product> AddProductAsync(this IASPNETCoreApi operations, Product product = default(Product), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddProductWithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='itemId'> /// </param> public static void RemoveItemFromCart(this IASPNETCoreApi operations, int itemId) { operations.RemoveItemFromCartAsync(itemId).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='itemId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task AddItemToCartAsync(this IASPNETCoreApi operations, int itemId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.AddItemToCartWithHttpMessagesAsync(itemId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='itemId'> /// </param> public static void AddItemToCart(this IASPNETCoreApi operations, int itemId) { operations.AddItemToCartAsync(itemId).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BuyCartAsync(this IASPNETCoreApi operations, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BuyCartWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static void BuyCart(this IASPNETCoreApi operations) { operations.BuyCartAsync().GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteProductAsync(this IASPNETCoreApi operations, int id, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteProductWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static Cart GetCart(this IASPNETCoreApi operations) { return(operations.GetCartAsync().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static void DeleteProduct(this IASPNETCoreApi operations, int id) { operations.DeleteProductAsync(id).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> public static Product GetProduct(this IASPNETCoreApi operations, int id) { return(operations.GetProductAsync(id).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='product'> /// </param> public static Product AddProduct(this IASPNETCoreApi operations, Product product = default(Product)) { return(operations.AddProductAsync(product).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='product'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdateProductAsync(this IASPNETCoreApi operations, Product product = default(Product), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdateProductWithHttpMessagesAsync(product, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='product'> /// </param> public static void UpdateProduct(this IASPNETCoreApi operations, Product product = default(Product)) { operations.UpdateProductAsync(product).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <Product> GetProducts(this IASPNETCoreApi operations) { return(operations.GetProductsAsync().GetAwaiter().GetResult()); }