예제 #1
0
 /// <summary>
 /// Initializes a new instance of the EngineDataAPI class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public EngineDataAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._productCategories = new ProductCategories(this);
     this._values            = new Values(this);
     this._baseUri           = new Uri("http://engineapi.azurewebsites.net:80");
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the EngineDataAPI class.
 /// </summary>
 public EngineDataAPI()
     : base()
 {
     this._productCategories = new ProductCategories(this);
     this._values            = new Values(this);
     this._baseUri           = new Uri("http://engineapi.azurewebsites.net:80");
 }
 /// <summary>
 /// Initializes a new instance of the EngineApiClient class.
 /// </summary>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public EngineApiClient(params DelegatingHandler[] handlers)
     : base(handlers)
 {
     this._productCategories = new ProductCategories(this);
     this._values            = new Values(this);
     this._baseUri           = new Uri("https://engineapiclient.azurewebsites.net:443");
 }
 /// <summary>
 /// Initializes a new instance of the EngineApiClient class.
 /// </summary>
 public EngineApiClient()
     : base()
 {
     this._productCategories = new ProductCategories(this);
     this._values            = new Values(this);
     this._baseUri           = new Uri("https://engineapiclient.azurewebsites.net:443");
 }
예제 #5
0
 public PriceController(
     IListOfGoods listOfGoods,
     IProductCategories productCategories)
 {
     _listOfGoods       = listOfGoods;
     _productCategories = productCategories;
 }
 /// <param name='operations'>
 /// Reference to the Engine.API.IProductCategories.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 public static ProductCategory GetProductCategoryById(this IProductCategories operations, int id)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProductCategories)s).GetProductCategoryByIdAsync(id);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #7
0
 /// <param name='operations'>
 /// Reference to the Engine.Core.IProductCategories.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='value'>
 /// Required.
 /// </param>
 public static object PutByIdAndValue(this IProductCategories operations, int id, string value)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IProductCategories)s).PutByIdAndValueAsync(id, value);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
예제 #8
0
 public ShopController(
     IListOfGoods listOfGoods,
     IProductCategories productCategories,
     IGoodsSold goodsSold,
     IProcurement procurement,
     IEmployeesFacade employeesFacade)
 {
     _goodsSold         = goodsSold;
     _productCategories = productCategories;
     _procurement       = procurement;
     _listOfGoods       = listOfGoods;
     _employeesFacade   = employeesFacade;
 }
 public ProductCategoryController(IProductCategories categories, ILogger <ProductCategoryController> logger)
 {
     _categories = categories;
     _logger     = logger;
 }
        /// <param name='operations'>
        /// Reference to the Engine.API.IProductCategories.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <ProductCategory> GetProductCategoryByIdAsync(this IProductCategories operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <Engine.API.Models.ProductCategory> result = await operations.GetProductCategoryByIdWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the Engine.API.IProductCategories.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <ProductCategoryDTO> > GetProductCategoriesAsync(this IProductCategories operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <Engine.API.Models.ProductCategoryDTO> > result = await operations.GetProductCategoriesWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
        /// <param name='operations'>
        /// Reference to the Engine.API.IProductCategories.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='productCategory'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PutProductCategoryByIdAndProductcategoryAsync(this IProductCategories operations, int id, ProductCategory productCategory, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutProductCategoryByIdAndProductcategoryWithOperationResponseAsync(id, productCategory, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
예제 #13
0
        /// <param name='operations'>
        /// Reference to the Engine.Core.IProductCategories.
        /// </param>
        /// <param name='value'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PostByValueAsync(this IProductCategories operations, string value, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PostByValueWithOperationResponseAsync(value, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }