Browse Source

Removed unused http Client from 3 files.

1. Removed Http Client from three files.
2. Those files are using gRPC communication.
pull/1357/head
Viswanatha Swamy 4 years ago
parent
commit
34c4132102
3 changed files with 6 additions and 12 deletions
  1. +2
    -4
      src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs
  2. +2
    -4
      src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs
  3. +2
    -4
      src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderingService.cs

+ 2
- 4
src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs View File

@ -4,7 +4,6 @@ using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
@ -12,13 +11,12 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
public class BasketService : IBasketService
{
private readonly UrlsConfig _urls;
public readonly HttpClient _httpClient;
private readonly ILogger<BasketService> _logger;
public BasketService(HttpClient httpClient, IOptions<UrlsConfig> config, ILogger<BasketService> logger)
public BasketService(IOptions<UrlsConfig> config, ILogger<BasketService> logger)
{
_urls = config.Value;
_httpClient = httpClient;
_logger = logger;
}


+ 2
- 4
src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs View File

@ -5,7 +5,6 @@ using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using static CatalogApi.Catalog;
@ -13,14 +12,13 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
{
public class CatalogService : ICatalogService
{
private readonly HttpClient _httpClient;
private readonly ILogger<CatalogService> _logger;
private readonly UrlsConfig _urls;
public CatalogService(HttpClient httpClient, ILogger<CatalogService> logger, IOptions<UrlsConfig> config)
public CatalogService(ILogger<CatalogService> logger, IOptions<UrlsConfig> config)
{
_httpClient = httpClient;
_logger = logger;
_urls = config.Value;
}


+ 2
- 4
src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderingService.cs View File

@ -4,7 +4,6 @@ using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
@ -13,12 +12,11 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services
{
private readonly UrlsConfig _urls;
private readonly ILogger<OrderingService> _logger;
public readonly HttpClient _httpClient;
public OrderingService(HttpClient httpClient, IOptions<UrlsConfig> config, ILogger<OrderingService> logger)
public OrderingService(IOptions<UrlsConfig> config, ILogger<OrderingService> logger)
{
_urls = config.Value;
_httpClient = httpClient;
_logger = logger;
}


Loading…
Cancel
Save