Browse Source

clean MediatR useless references (#830)

Co-authored-by: cedri <cedri@BAS>
main
Cédric Michel 3 years ago
committed by GitHub
parent
commit
2e6fc6ca44
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/ApplicationCore/ApplicationCore.csproj
  2. 3
      src/PublicApi/Program.cs
  3. 2
      src/PublicApi/PublicApi.csproj
  4. 2
      src/Web/Configuration/ConfigureWebServices.cs
  5. 6
      src/Web/Features/MyOrders/GetMyOrdersHandler.cs
  6. 5
      src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs

3
src/ApplicationCore/ApplicationCore.csproj

@ -8,8 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" /> <PackageReference Include="Ardalis.GuardClauses" />
<PackageReference Include="Ardalis.Result" /> <PackageReference Include="Ardalis.Result" />
<PackageReference Include="Ardalis.Specification" /> <PackageReference Include="Ardalis.Specification" />
<PackageReference Include="MediatR" />
<PackageReference Include="System.Security.Claims" /> <PackageReference Include="System.Security.Claims" />
<PackageReference Include="System.Text.Json" /> <PackageReference Include="System.Text.Json" />
</ItemGroup> </ItemGroup>

3
src/PublicApi/Program.cs

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using BlazorShared; using BlazorShared;
using BlazorShared.Models; using BlazorShared.Models;
using MediatR;
using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
@ -83,8 +82,6 @@ builder.Services.AddCors(options =>
}); });
builder.Services.AddControllers(); builder.Services.AddControllers();
builder.Services.AddMediatR(typeof(CatalogItem).Assembly);
builder.Services.AddAutoMapper(typeof(MappingProfile).Assembly); builder.Services.AddAutoMapper(typeof(MappingProfile).Assembly);
builder.Services.AddEndpointsApiExplorer(); builder.Services.AddEndpointsApiExplorer();

2
src/PublicApi/PublicApi.csproj

@ -11,8 +11,6 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Ardalis.ApiEndpoints" /> <PackageReference Include="Ardalis.ApiEndpoints" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" /> <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" />
<PackageReference Include="MediatR" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" />
<PackageReference Include="MinimalApi.Endpoint" /> <PackageReference Include="MinimalApi.Endpoint" />
<PackageReference Include="Swashbuckle.AspNetCore" /> <PackageReference Include="Swashbuckle.AspNetCore" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" />

2
src/Web/Configuration/ConfigureWebServices.cs

@ -1,8 +1,6 @@
using MediatR; using MediatR;
using Microsoft.eShopWeb.Web.Interfaces; using Microsoft.eShopWeb.Web.Interfaces;
using Microsoft.eShopWeb.Web.Services; using Microsoft.eShopWeb.Web.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.eShopWeb.Web.Configuration; namespace Microsoft.eShopWeb.Web.Configuration;

6
src/Web/Features/MyOrders/GetMyOrdersHandler.cs

@ -1,8 +1,4 @@
using System.Collections.Generic; using MediatR;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate; using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Specifications; using Microsoft.eShopWeb.ApplicationCore.Specifications;

5
src/Web/Features/OrderDetails/GetOrderDetailsHandler.cs

@ -1,7 +1,4 @@
using System.Linq; using MediatR;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate; using Microsoft.eShopWeb.ApplicationCore.Entities.OrderAggregate;
using Microsoft.eShopWeb.ApplicationCore.Interfaces; using Microsoft.eShopWeb.ApplicationCore.Interfaces;
using Microsoft.eShopWeb.ApplicationCore.Specifications; using Microsoft.eShopWeb.ApplicationCore.Specifications;

Loading…
Cancel
Save