From 2e6fc6ca44b64578254896ee98ec2d00c41f0414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Michel?= Date: Thu, 22 Dec 2022 16:01:28 +0100 Subject: [PATCH] clean MediatR useless references (#830) Co-authored-by: cedri --- src/ApplicationCore/ApplicationCore.csproj | 3 +-- src/PublicApi/Program.cs | 3 --- src/PublicApi/PublicApi.csproj | 2 -- src/Web/Configuration/ConfigureWebServices.cs | 2 -- src/Web/Features/MyOrders/GetMyOrdersHandler.cs | 6 +----- src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs | 5 +---- 6 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/ApplicationCore/ApplicationCore.csproj b/src/ApplicationCore/ApplicationCore.csproj index 1e7e77b..a0a5bbe 100644 --- a/src/ApplicationCore/ApplicationCore.csproj +++ b/src/ApplicationCore/ApplicationCore.csproj @@ -8,8 +8,7 @@ - - + diff --git a/src/PublicApi/Program.cs b/src/PublicApi/Program.cs index 7356a62..dffc917 100644 --- a/src/PublicApi/Program.cs +++ b/src/PublicApi/Program.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Text; using BlazorShared; using BlazorShared.Models; -using MediatR; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Identity; @@ -83,8 +82,6 @@ builder.Services.AddCors(options => }); builder.Services.AddControllers(); - -builder.Services.AddMediatR(typeof(CatalogItem).Assembly); builder.Services.AddAutoMapper(typeof(MappingProfile).Assembly); builder.Services.AddEndpointsApiExplorer(); diff --git a/src/PublicApi/PublicApi.csproj b/src/PublicApi/PublicApi.csproj index a7d195c..965ea6d 100644 --- a/src/PublicApi/PublicApi.csproj +++ b/src/PublicApi/PublicApi.csproj @@ -11,8 +11,6 @@ - - diff --git a/src/Web/Configuration/ConfigureWebServices.cs b/src/Web/Configuration/ConfigureWebServices.cs index 478b89d..f89a99a 100644 --- a/src/Web/Configuration/ConfigureWebServices.cs +++ b/src/Web/Configuration/ConfigureWebServices.cs @@ -1,8 +1,6 @@ using MediatR; using Microsoft.eShopWeb.Web.Interfaces; using Microsoft.eShopWeb.Web.Services; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; namespace Microsoft.eShopWeb.Web.Configuration; diff --git a/src/Web/Features/MyOrders/GetMyOrdersHandler.cs b/src/Web/Features/MyOrders/GetMyOrdersHandler.cs index 6cd64af..125f0a9 100644 --- a/src/Web/Features/MyOrders/GetMyOrdersHandler.cs +++ b/src/Web/Features/MyOrders/GetMyOrdersHandler.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using MediatR; +using MediatR; using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate; using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Specifications; diff --git a/src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs b/src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs index dab5050..be7b8dc 100644 --- a/src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs +++ b/src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs @@ -1,7 +1,4 @@ -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using MediatR; +using MediatR; using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate; using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Specifications;