Skip to content

Commit

Permalink
clean MediatR useless references (dotnet-architecture#830)
Browse files Browse the repository at this point in the history
Co-authored-by: cedri <cedri@BAS>
michelcedric and cedri authored Dec 22, 2022
1 parent 303f145 commit 2e6fc6c
Showing 6 changed files with 3 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/ApplicationCore/ApplicationCore.csproj
Original file line number Diff line number Diff line change
@@ -8,8 +8,7 @@
<ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" />
<PackageReference Include="Ardalis.Result" />
<PackageReference Include="Ardalis.Specification" />
<PackageReference Include="MediatR" />
<PackageReference Include="Ardalis.Specification" />
<PackageReference Include="System.Security.Claims" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>
3 changes: 0 additions & 3 deletions src/PublicApi/Program.cs
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
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.AddControllers();

builder.Services.AddMediatR(typeof(CatalogItem).Assembly);
builder.Services.AddAutoMapper(typeof(MappingProfile).Assembly);

builder.Services.AddEndpointsApiExplorer();
2 changes: 0 additions & 2 deletions src/PublicApi/PublicApi.csproj
Original file line number Diff line number Diff line change
@@ -11,8 +11,6 @@
<ItemGroup>
<PackageReference Include="Ardalis.ApiEndpoints" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" />
<PackageReference Include="MediatR" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" />
<PackageReference Include="MinimalApi.Endpoint" />
<PackageReference Include="Swashbuckle.AspNetCore" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" />
2 changes: 0 additions & 2 deletions src/Web/Configuration/ConfigureWebServices.cs
Original file line number Diff line number Diff line change
@@ -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;

6 changes: 1 addition & 5 deletions src/Web/Features/MyOrders/GetMyOrdersHandler.cs
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 1 addition & 4 deletions src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 2e6fc6c

Please sign in to comment.