Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down Expand Up @@ -29,16 +29,14 @@
<PackageVersion Include="FastEndpoints.ApiExplorer" Version="2.2.0" />
<PackageVersion Include="FastEndpoints.Swagger" Version="5.19.2" />
<PackageVersion Include="FastEndpoints.Swagger.Swashbuckle" Version="2.2.0" />
<<<<<<< HEAD
<PackageVersion Include="FluentAssertions" Version="8.9.0" />
=======
>>>>>>> 30bbccbd14334429aa307ef9870a7dd4bde269ca
<PackageVersion Include="Flurl" Version="4.0.0" />
<PackageVersion Include="Flurl.Http" Version="4.0.2" />
<PackageVersion Include="GoogleReCaptcha.V3" Version="1.3.1" />
<PackageVersion Include="Markdig" Version="1.1.3" />
<PackageVersion Include="MediaInfo.Wrapper.Core" Version="21.9.3" />
<PackageVersion Include="MediatR" Version="14.1.0" />
<PackageVersion Include="Mediator.Abstractions" Version="3.0.2" />
<PackageVersion Include="Mediator.SourceGenerator" Version="3.0.2" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.2.0" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="10.2.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.0" />
Expand Down
2 changes: 1 addition & 1 deletion src/DevBetterWeb.Core/DevBetterWeb.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Ardalis.SmartEnum" />
<PackageReference Include="Ardalis.Specification" />
<PackageReference Include="CSharpFunctionalExtensions" />
<PackageReference Include="MediatR" />
<PackageReference Include="Mediator.Abstractions" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" />
<PackageReference Include="NimblePros.Vimeo" />
Expand Down
2 changes: 1 addition & 1 deletion src/DevBetterWeb.Core/Events/AppStartedEvent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using DevBetterWeb.Core.SharedKernel;
using MediatR;
using Mediator;

namespace DevBetterWeb.Core.Events;

Expand Down
2 changes: 1 addition & 1 deletion src/DevBetterWeb.Core/Interfaces/IHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Threading.Tasks;
using DevBetterWeb.Core.Events;
using DevBetterWeb.Core.SharedKernel;
using MediatR;
using Mediator;

namespace DevBetterWeb.Core.Interfaces;

Expand Down
2 changes: 1 addition & 1 deletion src/DevBetterWeb.Core/SharedKernel/BaseDomainEvent.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using MediatR;
using Mediator;

namespace DevBetterWeb.Core.SharedKernel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ItemGroup>
<PackageReference Include="Ardalis.Specification.EntityFrameworkCore" />
<PackageReference Include="Markdig" />
<PackageReference Include="MediatR" />
<PackageReference Include="Mediator.Abstractions" />
<PackageReference Include="NimblePros.Vimeo" />
<PackageReference Include="Ardalis.EFCore.Extensions" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Threading.Tasks;
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Core.SharedKernel;
using MediatR;
using Mediator;

namespace DevBetterWeb.Infrastructure.DomainEvents;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
using System.Threading.Tasks;
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Core.SharedKernel;
using MediatR;
using Mediator;
using Microsoft.Extensions.Logging;

namespace DevBetterWeb.Infrastructure.DomainEvents;

public class MediatRDomainEventDispatcher : IDomainEventDispatcher
public class MediatorDomainEventDispatcher : IDomainEventDispatcher
{
private readonly IMediator _mediator;
private readonly ILogger<MediatRDomainEventDispatcher> _logger;
private readonly ILogger<MediatorDomainEventDispatcher> _logger;

public MediatRDomainEventDispatcher(IMediator mediator, ILogger<MediatRDomainEventDispatcher> logger)
public MediatorDomainEventDispatcher(IMediator mediator, ILogger<MediatorDomainEventDispatcher> logger)
{
_mediator = mediator;
_logger = logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using DevBetterWeb.Core.Events;
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Infrastructure.DiscordWebooks;
using MediatR;
using Mediator;

namespace DevBetterWeb.Core.Handlers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static IServiceCollection AddInfrastructureServices(this IServiceCollecti
}

// Common Dependencies
services.AddScoped<IDomainEventDispatcher,MediatRDomainEventDispatcher>();
services.AddScoped<IDomainEventDispatcher, MediatorDomainEventDispatcher>();
// services.AddScoped<IDomainEventDispatcher>(sp => sp.GetRequiredService<DomainEventDispatcher>());

services.AddScoped<IMemberRegistrationService, MemberRegistrationService>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using DevBetterWeb.Core.Exceptions;
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Infrastructure.Identity.Data;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using DevBetterWeb.Core.Exceptions;
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Infrastructure.Identity.Data;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using DevBetterWeb.Core.Events;
using DevBetterWeb.Infrastructure.DomainEvents;
using DevBetterWeb.Infrastructure.Identity.Data;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI.Services;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Infrastructure.Identity.Data;
using GoogleReCaptcha.V3.Interface;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Infrastructure.Identity.Data;
using GoogleReCaptcha.V3.Interface;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
Expand Down
2 changes: 1 addition & 1 deletion src/DevBetterWeb.Web/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DevBetterWeb.Core.Events;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
Expand Down
3 changes: 2 additions & 1 deletion src/DevBetterWeb.Web/DevBetterWeb.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<PackageReference Include="CSharpFunctionalExtensions" />
<PackageReference Include="Dapper" />
<PackageReference Include="GoogleReCaptcha.V3" />
<PackageReference Include="MediatR" />
<PackageReference Include="Mediator.Abstractions" />
<PackageReference Include="Mediator.SourceGenerator" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" />
<PackageReference Include="Microsoft.AspNetCore.AzureAppServices.HostingStartup" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Core.Specs;
using DevBetterWeb.Infrastructure.Identity.Data;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
Expand Down
14 changes: 9 additions & 5 deletions src/DevBetterWeb.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,15 @@

builder.Services.AddInfrastructureServices(isDevelopment, vimeoToken);

builder.Services.AddMediatR(cfg =>
cfg.RegisterServicesFromAssemblies(
typeof(IAggregateRoot).Assembly,
typeof(AppDbContext).Assembly,
typeof(Program).Assembly));
builder.Services.AddMediator(options =>
{
options.Assemblies =
[
typeof(IAggregateRoot),
typeof(AppDbContext),
typeof(Program)
];
});

builder.Services.AddScoped(typeof(IRepository<>), typeof(EfRepository<>));

Expand Down
2 changes: 1 addition & 1 deletion src/DevBetterWeb.Web/Services/DailyCheckService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using DevBetterWeb.Core.Events;
using DevBetterWeb.Core.Interfaces;
using DevBetterWeb.Core.Specs;
using MediatR;
using Mediator;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Threading.Tasks;
using DevBetterWeb.Core.Events;
using DevBetterWeb.Core.Interfaces;
using MediatR;
using Mediator;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using DevBetterWeb.Web;
using DevBetterWeb.Web.Areas.Identity;
using DevBetterWeb.Web.Models;
using MediatR;
using Mediator;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.Testing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MediatR" />
<PackageReference Include="Mediator.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
Expand Down
2 changes: 1 addition & 1 deletion tests/DevBetterWeb.FunctionalTests/NoOpMediator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Mediator;

namespace DevBetterWeb.FunctionalTests;

Expand Down
Loading