Skip to content

Commit

Permalink
call ModulesMiddleware from sharedFeaturesMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidEggenberger committed Mar 8, 2024
1 parent 6e53253 commit f63328a
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ModularMonolith.sln
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Modules.Subscriptions.Integ
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web", "Web", "{079BF8CF-63EB-4836-ABB1-FD49B5EE5AD5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Client", "Source\Shared\Client\Shared.Client.csproj", "{FCC4866D-C903-4F2D-8A03-19AE86DA180B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared.Client", "Source\Shared\Client\Shared.Client.csproj", "{FCC4866D-C903-4F2D-8A03-19AE86DA180B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Modules.TenantIdentity.Features.Infrastructure.EFCore;
using Shared.Features.CQRS.Command;
using Shared.Kernel.BuildingBlocks;
using System.Threading;

namespace Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate.Application.Commands
Expand Down
6 changes: 6 additions & 0 deletions Source/Shared/Client/Components/Modals/DefaultModalOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Shared.Client.Components.Modals
{
public class DefaultModalOptions
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file removed Source/Shared/Client/wwwroot/background.png
Binary file not shown.
6 changes: 0 additions & 6 deletions Source/Shared/Client/wwwroot/exampleJsInterop.js

This file was deleted.

4 changes: 1 addition & 3 deletions Source/Shared/Features/CQRS/Query/IQueryHandler.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Shared.Features.Server;

namespace Shared.Features.CQRS.Query
namespace Shared.Features.CQRS.Query
{
public interface IQueryHandler<in TQuery, TQueryResult> where TQuery : IQuery<TQueryResult>
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Shared/Features/Modules/Registrator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void AddModules(this IServiceCollection services)
services.RegisterCQRS(startupModules.Where(sm => sm.Startup.FeaturesAssembly is not null).Select(sm => sm.Startup.FeaturesAssembly).ToArray());
}

public static IApplicationBuilder UseModules(this IApplicationBuilder app, IHostEnvironment env)
public static IApplicationBuilder UseModulesMiddleware(this IApplicationBuilder app, IHostEnvironment env)
{
// Adds endpoints defined in modules
var modules = app
Expand Down
4 changes: 3 additions & 1 deletion Source/Shared/Features/Registrator.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Shared.Features.CQRS;
Expand Down Expand Up @@ -26,10 +27,11 @@ public static IServiceCollection AddSharedFeatures(this IServiceCollection servi
return services;
}

public static IApplicationBuilder UseSharedFeaturesMiddleware(this IApplicationBuilder app)
public static IApplicationBuilder UseSharedFeaturesMiddleware(this IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseEFCoreMiddleware();
app.UseServerExecutionContextMiddleware();
app.UseModulesMiddleware(env);

return app;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Shared.Features.CQRS.Command;
using Shared.Features.CQRS.DomainEvent;
using Shared.Features.CQRS.IntegrationEvent;
using Shared.Features.CQRS.Query;
using Shared.Kernel.BuildingBlocks;
using Shared.Kernel.BuildingBlocks.Auth;
using Shared.Kernel.Extensions.ClaimsPrincipal;
Expand Down
5 changes: 1 addition & 4 deletions Source/Web/Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Shared.Features.Modules;
using Shared.Features;
using Modules.Subscription.Server;
using Shared.Features.Server.ExecutionContext;

namespace Web.Server
{
Expand Down Expand Up @@ -67,9 +66,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseAuthorization();

app.UseBuildingBlocksMiddleware();
app.UseSharedFeaturesMiddleware();

app.UseModules(env);
app.UseSharedFeaturesMiddleware(env);

app.UseEndpoints(endpoints =>
{
Expand Down

0 comments on commit f63328a

Please sign in to comment.