From 5aff0a8893b9d1ce9327500c84928c90e5c68762 Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Wed, 28 Aug 2024 19:35:51 +0200 Subject: [PATCH] Combine all SharedKernel projects into a single assembly called SharedKernel --- .github/workflows/account-management.yml | 4 +- .github/workflows/back-office.yml | 4 +- application/AppGateway/AppGateway.csproj | 3 +- .../AuthenticationCookieMiddleware.cs | 2 +- application/AppGateway/Program.cs | 2 +- .../SharedAccessSignatureRequestTransform.cs | 2 +- application/PlatformPlatform.sln | 28 +------- .../account-management/AccountManagement.slnf | 5 +- .../Api/AccountManagement.Api.csproj | 2 +- .../Authentication/AuthenticationEndpoints.cs | 4 +- application/account-management/Api/Program.cs | 4 +- .../Api/Signups/SignupEndpoints.cs | 4 +- .../Api/Tenants/TenantEndpoints.cs | 4 +- .../Api/Users/UserEndpoints.cs | 4 +- .../Core/AccountManagement.Core.csproj | 7 +- .../Authentication/Commands/CompleteLogin.cs | 6 +- .../Core/Authentication/Commands/Logut.cs | 4 +- .../Commands/RefreshAuthenticationTokens.cs | 4 +- .../Authentication/Commands/StartLogin.cs | 10 +-- .../Domain/ILoginProcessRepository.cs | 2 +- .../Core/Authentication/Domain/Login.cs | 4 +- .../Domain/LoginProcessRepository.cs | 2 +- .../Services/AuthenticationTokenGenerator.cs | 2 +- .../Services/AuthenticationTokenService.cs | 2 +- .../Database/AccountManagementDbContext.cs | 2 +- .../Core/DependencyConfiguration.cs | 5 +- .../Core/Signups/Commands/CompleteSignup.cs | 6 +- .../Core/Signups/Commands/StartSignup.cs | 10 +-- .../Core/Signups/Domain/ISignupRepository.cs | 2 +- .../Core/Signups/Domain/Signup.cs | 4 +- .../Core/Signups/Domain/SignupRepository.cs | 2 +- .../Core/Signups/Queries/IsSubdomainFree.cs | 2 +- .../Core/TelemetryEvents/TelemetryEvents.cs | 2 +- .../Core/Tenants/Commands/DeleteTenant.cs | 4 +- .../Core/Tenants/Commands/UpdateTenant.cs | 4 +- .../Core/Tenants/Domain/ITenantRepository.cs | 2 +- .../Core/Tenants/Domain/Tenant.cs | 2 +- .../Core/Tenants/Domain/TenantEvents.cs | 2 +- .../Core/Tenants/Domain/TenantRepository.cs | 2 +- .../Core/Tenants/Domain/TenantTypes.cs | 2 +- .../Core/Tenants/Queries/GetTenant.cs | 2 +- .../Core/Users/Commands/ChangeUserRole.cs | 4 +- .../Core/Users/Commands/CreateUser.cs | 6 +- .../Core/Users/Commands/DeleteUser.cs | 4 +- .../Core/Users/Commands/RemoveAvatar.cs | 4 +- .../Core/Users/Commands/UpdateAvatar.cs | 6 +- .../Core/Users/Commands/UpdateUser.cs | 6 +- .../Core/Users/Domain/IUserRepository.cs | 4 +- .../Core/Users/Domain/User.cs | 2 +- .../Core/Users/Domain/UserRepository.cs | 3 +- .../Core/Users/Domain/UserTypes.cs | 2 +- .../Core/Users/Queries/GetUser.cs | 2 +- .../Core/Users/Queries/GetUsers.cs | 4 +- .../Tests/Api/BaseApiTest.cs | 8 +-- .../Tests/Api/Signups/SignupTests.cs | 2 +- .../Tests/Api/Tenants/TenantEndpointsTests.cs | 2 +- .../Tests/Api/Users/UserEndpointsTests.cs | 2 +- .../IdPrefixForAllStronglyTypedUlidTests.cs | 2 +- .../ArchitectureTests/PublicClassesTests.cs | 2 +- .../account-management/Tests/BaseTest.cs | 4 +- .../Tests/DatabaseSeeder.cs | 2 +- .../Tests/FakerExtensions.cs | 2 +- .../Workers/AccountManagement.Workers.csproj | 2 +- .../account-management/Workers/Program.cs | 3 +- .../back-office/Api/BackOffice.Api.csproj | 2 +- application/back-office/Api/Program.cs | 4 +- application/back-office/BackOffice.slnf | 5 +- .../back-office/Core/BackOffice.Core.csproj | 3 +- .../Core/Database/BackOfficeDbContext.cs | 2 +- .../Core/DependencyConfiguration.cs | 5 +- .../back-office/Tests/Api/BaseApiTest.cs | 10 +-- .../IdPrefixForAllStronglyTypedUlidTests.cs | 2 +- .../ArchitectureTests/PublicClassesTests.cs | 2 +- application/back-office/Tests/BaseTest.cs | 4 +- .../back-office/Tests/FakerExtensions.cs | 2 +- .../Workers/BackOffice.Workers.csproj | 2 +- application/back-office/Workers/Program.cs | 3 +- .../ApiCore/SharedKernel.ApiCore.csproj | 36 ----------- .../ApplicationCoreConfiguration.cs | 31 --------- .../SharedKernel.ApplicationCore.csproj | 24 ------- .../ApplicationCore/Validation/ErrorDetail.cs | 3 - .../Validation/ErrorMessage.cs | 3 - .../DomainEvents/IDomainEventCollector.cs | 8 --- .../DomainCore/Persistence/SortOrder.cs | 7 -- .../DomainCore/SharedKernel.DomainCore.csproj | 19 ------ .../SharedKernel.InfrastructureCore.csproj | 32 ---------- .../ApiCoreConfiguration.cs | 17 +++-- .../ApiResults/ApiResult.cs | 4 +- .../ApiResults/ApiResultExtensions.cs | 4 +- .../Aspire/ServiceDefaultsExtensions.cs | 4 +- .../AuthenticationTokenHttpKeys.cs | 2 +- .../Authentication/ITokenSigningService.cs | 2 +- .../Authentication/OneTimePasswordHelper.cs | 2 +- .../Authentication/UserInfo.cs | 2 +- .../Behaviors/ConcurrentCommandCounter.cs | 2 +- .../PublishDomainEventsPipelineBehavior.cs | 6 +- .../PublishTelemetryEventsPipelineBehavior.cs | 6 +- .../Behaviors/UnitOfWorkPipelineBehavior.cs | 6 +- .../Behaviors/ValidationPipelineBehavior.cs | 6 +- .../Cqrs/ICommand.cs | 2 +- .../Cqrs/Result.cs | 4 +- .../DomainEvents/IDomainEvent.cs | 2 +- .../DomainEvents/IDomainEventCollector.cs | 8 +++ .../Endpoints/HealthEndpoints.cs | 2 +- .../Endpoints/IEndpoints.cs | 2 +- .../Endpoints/TestEndpoints.cs | 2 +- .../Endpoints/TrackEndpoints.cs | 2 +- .../Entities/AggregateRoot.cs | 4 +- .../Entities/AudibleEntity.cs | 2 +- .../Entities/Entity.cs | 4 +- .../Entities/EntityEqualityComparer.cs | 2 +- .../Entities/IAuditableEntity.cs | 2 +- .../Entities/ICrudRepository.cs | 2 +- .../EntityFramework/ModelBuilderExtensions.cs | 4 +- .../EntityFramework/SharedKernelDbContext.cs | 4 +- .../UpdateAuditableEntitiesInterceptor.cs | 4 +- .../Filters/EndpointTelemetryFilter.cs | 2 +- .../Identity/IdGenerator.cs | 2 +- .../Identity/IdPrefixAttribute.cs | 2 +- .../Identity/StronglyTypedId.cs | 2 +- .../Identity/StronglyTypedIdTypeConverter.cs | 2 +- .../Identity/StronglyTypedLongId.cs | 2 +- .../Identity/StronglyTypedUlid.cs | 2 +- .../InfrastructureCoreConfiguration.cs | 38 ++++++++--- .../Middleware/GlobalExceptionHandler.cs | 2 +- .../ModelBindingExceptionHandlerMiddleware.cs | 2 +- .../Middleware/TimeoutExceptionHandler.cs | 2 +- .../Persistence/DomainEventCollector.cs | 6 +- .../Persistence/IUnitOfWork.cs | 2 +- .../Persistence/RepositoryBase.cs | 5 +- .../SharedKernel/Persistence/SortOrder.cs | 7 ++ .../Persistence/UnitOfWork.cs | 7 +- .../StronglyTypedDocumentProcessor.cs | 4 +- .../Services/AzureEmailService.cs | 3 +- .../Services/AzureTokenSigningService.cs | 4 +- .../Services/BlobStorage.cs | 3 +- .../Services/DevelopmentEmailService.cs | 3 +- .../DevelopmentTokenSigningService.cs | 4 +- .../Services/IBlobStorage.cs | 2 +- .../Services/IEmailService.cs | 2 +- .../SharedKernel/SharedKernel.csproj | 64 +++++++++++++++++++ .../SinglePageAppConfiguration.cs | 2 +- .../SinglePageAppFallbackExtensions.cs | 4 +- .../TelemetryEventsCollector.cs | 2 +- .../SharedKernel/Validation/ErrorDetail.cs | 3 + .../SharedKernel/Validation/ErrorMessage.cs | 3 + .../Validation/SharedValidations.cs | 2 +- ...ublishDomainEventsPipelineBehaviorTests.cs | 6 +- .../UnitOfWorkPipelineBehaviorTests.cs | 6 +- .../TelemetryEventsCollectorSpy.cs | 2 +- .../Entities/EntityEqualityComparerTests.cs | 2 +- .../Tests/DomainCore/Entities/EntityTests.cs | 4 +- .../DomainCore/Identity/IdGeneratorTests.cs | 2 +- .../Identity/StronglyTypedUlidTests.cs | 2 +- .../Persistence/RepositoryTests.cs | 2 +- .../Persistence/UnitOfWorkTests.cs | 2 +- .../Tests/SharedKernel.Tests.csproj | 4 +- .../Tests/TestEntities/TestAggregate.cs | 4 +- .../TestEntities/TestAggregateCreatedEvent.cs | 2 +- .../TestEntities/TestAggregateRepository.cs | 2 +- .../Tests/TestEntities/TestCommand.cs | 2 +- .../Tests/TestEntities/TestDbContext.cs | 2 +- 162 files changed, 350 insertions(+), 456 deletions(-) delete mode 100644 application/shared-kernel/ApiCore/SharedKernel.ApiCore.csproj delete mode 100644 application/shared-kernel/ApplicationCore/ApplicationCoreConfiguration.cs delete mode 100644 application/shared-kernel/ApplicationCore/SharedKernel.ApplicationCore.csproj delete mode 100644 application/shared-kernel/ApplicationCore/Validation/ErrorDetail.cs delete mode 100644 application/shared-kernel/ApplicationCore/Validation/ErrorMessage.cs delete mode 100644 application/shared-kernel/DomainCore/DomainEvents/IDomainEventCollector.cs delete mode 100644 application/shared-kernel/DomainCore/Persistence/SortOrder.cs delete mode 100644 application/shared-kernel/DomainCore/SharedKernel.DomainCore.csproj delete mode 100644 application/shared-kernel/InfrastructureCore/SharedKernel.InfrastructureCore.csproj rename application/shared-kernel/{ApiCore => SharedKernel}/ApiCoreConfiguration.cs (94%) rename application/shared-kernel/{ApiCore => SharedKernel}/ApiResults/ApiResult.cs (94%) rename application/shared-kernel/{ApiCore => SharedKernel}/ApiResults/ApiResultExtensions.cs (63%) rename application/shared-kernel/{ApiCore => SharedKernel}/Aspire/ServiceDefaultsExtensions.cs (97%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Authentication/AuthenticationTokenHttpKeys.cs (81%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Authentication/ITokenSigningService.cs (80%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Authentication/OneTimePasswordHelper.cs (94%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Authentication/UserInfo.cs (95%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Behaviors/ConcurrentCommandCounter.cs (93%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Behaviors/PublishDomainEventsPipelineBehavior.cs (89%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Behaviors/PublishTelemetryEventsPipelineBehavior.cs (82%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Behaviors/UnitOfWorkPipelineBehavior.cs (87%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Behaviors/ValidationPipelineBehavior.cs (91%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Cqrs/ICommand.cs (72%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Cqrs/Result.cs (97%) rename application/shared-kernel/{DomainCore => SharedKernel}/DomainEvents/IDomainEvent.cs (95%) create mode 100644 application/shared-kernel/SharedKernel/DomainEvents/IDomainEventCollector.cs rename application/shared-kernel/{ApiCore => SharedKernel}/Endpoints/HealthEndpoints.cs (91%) rename application/shared-kernel/{ApiCore => SharedKernel}/Endpoints/IEndpoints.cs (68%) rename application/shared-kernel/{ApiCore => SharedKernel}/Endpoints/TestEndpoints.cs (92%) rename application/shared-kernel/{ApiCore => SharedKernel}/Endpoints/TrackEndpoints.cs (99%) rename application/shared-kernel/{DomainCore => SharedKernel}/Entities/AggregateRoot.cs (92%) rename application/shared-kernel/{DomainCore => SharedKernel}/Entities/AudibleEntity.cs (93%) rename application/shared-kernel/{DomainCore => SharedKernel}/Entities/Entity.cs (91%) rename application/shared-kernel/{DomainCore => SharedKernel}/Entities/EntityEqualityComparer.cs (89%) rename application/shared-kernel/{DomainCore => SharedKernel}/Entities/IAuditableEntity.cs (85%) rename application/shared-kernel/{DomainCore => SharedKernel}/Entities/ICrudRepository.cs (82%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/EntityFramework/ModelBuilderExtensions.cs (96%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/EntityFramework/SharedKernelDbContext.cs (88%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/EntityFramework/UpdateAuditableEntitiesInterceptor.cs (93%) rename application/shared-kernel/{ApiCore => SharedKernel}/Filters/EndpointTelemetryFilter.cs (93%) rename application/shared-kernel/{DomainCore => SharedKernel}/Identity/IdGenerator.cs (97%) rename application/shared-kernel/{DomainCore => SharedKernel}/Identity/IdPrefixAttribute.cs (71%) rename application/shared-kernel/{DomainCore => SharedKernel}/Identity/StronglyTypedId.cs (95%) rename application/shared-kernel/{DomainCore => SharedKernel}/Identity/StronglyTypedIdTypeConverter.cs (92%) rename application/shared-kernel/{DomainCore => SharedKernel}/Identity/StronglyTypedLongId.cs (94%) rename application/shared-kernel/{DomainCore => SharedKernel}/Identity/StronglyTypedUlid.cs (95%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/InfrastructureCoreConfiguration.cs (82%) rename application/shared-kernel/{ApiCore => SharedKernel}/Middleware/GlobalExceptionHandler.cs (94%) rename application/shared-kernel/{ApiCore => SharedKernel}/Middleware/ModelBindingExceptionHandlerMiddleware.cs (90%) rename application/shared-kernel/{ApiCore => SharedKernel}/Middleware/TimeoutExceptionHandler.cs (95%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Persistence/DomainEventCollector.cs (67%) rename application/shared-kernel/{DomainCore => SharedKernel}/Persistence/IUnitOfWork.cs (90%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Persistence/RepositoryBase.cs (91%) create mode 100644 application/shared-kernel/SharedKernel/Persistence/SortOrder.cs rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Persistence/UnitOfWork.cs (77%) rename application/shared-kernel/{ApiCore => SharedKernel}/SchemaProcessor/StronglyTypedDocumentProcessor.cs (90%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Services/AzureEmailService.cs (86%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Services/AzureTokenSigningService.cs (88%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Services/BlobStorage.cs (90%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Services/DevelopmentEmailService.cs (80%) rename application/shared-kernel/{InfrastructureCore => SharedKernel}/Services/DevelopmentTokenSigningService.cs (92%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Services/IBlobStorage.cs (82%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/Services/IEmailService.cs (69%) create mode 100644 application/shared-kernel/SharedKernel/SharedKernel.csproj rename application/shared-kernel/{ApiCore => SharedKernel}/SinglePageApp/SinglePageAppConfiguration.cs (99%) rename application/shared-kernel/{ApiCore => SharedKernel}/SinglePageApp/SinglePageAppFallbackExtensions.cs (97%) rename application/shared-kernel/{ApplicationCore => SharedKernel}/TelemetryEvents/TelemetryEventsCollector.cs (91%) create mode 100644 application/shared-kernel/SharedKernel/Validation/ErrorDetail.cs create mode 100644 application/shared-kernel/SharedKernel/Validation/ErrorMessage.cs rename application/shared-kernel/{ApplicationCore => SharedKernel}/Validation/SharedValidations.cs (95%) diff --git a/.github/workflows/account-management.yml b/.github/workflows/account-management.yml index 11c738967..8fa9f9090 100644 --- a/.github/workflows/account-management.yml +++ b/.github/workflows/account-management.yml @@ -72,10 +72,10 @@ jobs: run: dotnet restore - name: Generate and set user secret for token signing key - working-directory: application/shared-kernel/InfrastructureCore + working-directory: application/shared-kernel/SharedKernel run: | # Extract UserSecretsId from the .csproj file - USER_SECRETS_ID=$(grep -oP '(?<=).*?(?=)' SharedKernel.InfrastructureCore.csproj) + USER_SECRETS_ID=$(grep -oP '(?<=).*?(?=)' SharedKernel.csproj) # Generate a 512-bit key and set it as a user secret that can be use for token signing when running tests dotnet user-secrets set "authentication-token-signing-key" "$(openssl rand -base64 64)" --id $USER_SECRETS_ID diff --git a/.github/workflows/back-office.yml b/.github/workflows/back-office.yml index 930ee9914..1dc4146df 100644 --- a/.github/workflows/back-office.yml +++ b/.github/workflows/back-office.yml @@ -72,10 +72,10 @@ jobs: run: dotnet restore - name: Generate and set user secret for token signing key - working-directory: application/shared-kernel/InfrastructureCore + working-directory: application/shared-kernel/SharedKernel run: | # Extract UserSecretsId from the .csproj file - USER_SECRETS_ID=$(grep -oP '(?<=).*?(?=)' SharedKernel.InfrastructureCore.csproj) + USER_SECRETS_ID=$(grep -oP '(?<=).*?(?=)' SharedKernel.csproj) # Generate a 512-bit key and set it as a user secret that can be use for token signing when running tests dotnet user-secrets set "authentication-token-signing-key" "$(openssl rand -base64 64)" --id $USER_SECRETS_ID diff --git a/application/AppGateway/AppGateway.csproj b/application/AppGateway/AppGateway.csproj index 13e3f503c..73bfb9342 100644 --- a/application/AppGateway/AppGateway.csproj +++ b/application/AppGateway/AppGateway.csproj @@ -14,8 +14,7 @@ - - + diff --git a/application/AppGateway/Middleware/AuthenticationCookieMiddleware.cs b/application/AppGateway/Middleware/AuthenticationCookieMiddleware.cs index a28da5330..19893029a 100644 --- a/application/AppGateway/Middleware/AuthenticationCookieMiddleware.cs +++ b/application/AppGateway/Middleware/AuthenticationCookieMiddleware.cs @@ -2,7 +2,7 @@ using System.Net.Http.Headers; using System.Security.Claims; using Microsoft.IdentityModel.Tokens; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +using PlatformPlatform.SharedKernel.Authentication; namespace PlatformPlatform.AppGateway.Middleware; diff --git a/application/AppGateway/Program.cs b/application/AppGateway/Program.cs index 6bdd7a3da..cbd004829 100644 --- a/application/AppGateway/Program.cs +++ b/application/AppGateway/Program.cs @@ -2,7 +2,7 @@ using PlatformPlatform.AppGateway.Filters; using PlatformPlatform.AppGateway.Middleware; using PlatformPlatform.AppGateway.Transformations; -using PlatformPlatform.SharedKernel.InfrastructureCore; +using PlatformPlatform.SharedKernel; var builder = WebApplication.CreateBuilder(args); diff --git a/application/AppGateway/Transformations/SharedAccessSignatureRequestTransform.cs b/application/AppGateway/Transformations/SharedAccessSignatureRequestTransform.cs index 4cc4a7bb9..aafa08d2d 100644 --- a/application/AppGateway/Transformations/SharedAccessSignatureRequestTransform.cs +++ b/application/AppGateway/Transformations/SharedAccessSignatureRequestTransform.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.ApplicationCore.Services; +using PlatformPlatform.SharedKernel.Services; using Yarp.ReverseProxy.Transforms; namespace PlatformPlatform.AppGateway.Transformations; diff --git a/application/PlatformPlatform.sln b/application/PlatformPlatform.sln index 4e733bddc..a9789417c 100644 --- a/application/PlatformPlatform.sln +++ b/application/PlatformPlatform.sln @@ -5,18 +5,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppGateway", "AppGateway\Ap EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared-kernel", "shared-kernel", "{F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedKernel.DomainCore", "shared-kernel\DomainCore\SharedKernel.DomainCore.csproj", "{9781DA05-517E-46D7-9F8B-2C01AA74F1E4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedKernel.ApplicationCore", "shared-kernel\ApplicationCore\SharedKernel.ApplicationCore.csproj", "{9F41C6BD-7DF5-46AD-B0E7-4E4CECA2B9BF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedKernel.InfrastructureCore", "shared-kernel\InfrastructureCore\SharedKernel.InfrastructureCore.csproj", "{2B5B1AC7-7254-4527-B0F0-8F0A203CB625}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedKernel.ApiCore", "shared-kernel\ApiCore\SharedKernel.ApiCore.csproj", "{836ABCEF-C16B-4331-B8D5-0EA75E4101FE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedKernel", "shared-kernel\SharedKernel\SharedKernel.csproj", "{836ABCEF-C16B-4331-B8D5-0EA75E4101FE}" EndProject Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "SharedKernel.WebApp", "shared-webapp\SharedKernel.WebApp.esproj", "{72F46822-5815-48E0-9E2C-F95A4D58CB3F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{9E2EF0B0-2A92-489B-8910-070C871197B0}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedKernel.Tests", "shared-kernel\Tests\SharedKernel.Tests.csproj", "{B232D7BB-396A-46FE-B6D2-95041412C835}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "account-management", "account-management", "{EEA1463E-71F8-44E6-8055-787DAA5E62D2}" @@ -57,18 +49,6 @@ Global {8A9E566E-2DE4-4A60-9030-615C939BC05C}.Debug|Any CPU.Build.0 = Debug|Any CPU {8A9E566E-2DE4-4A60-9030-615C939BC05C}.Release|Any CPU.ActiveCfg = Release|Any CPU {8A9E566E-2DE4-4A60-9030-615C939BC05C}.Release|Any CPU.Build.0 = Release|Any CPU - {9781DA05-517E-46D7-9F8B-2C01AA74F1E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9781DA05-517E-46D7-9F8B-2C01AA74F1E4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9781DA05-517E-46D7-9F8B-2C01AA74F1E4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9781DA05-517E-46D7-9F8B-2C01AA74F1E4}.Release|Any CPU.Build.0 = Release|Any CPU - {9F41C6BD-7DF5-46AD-B0E7-4E4CECA2B9BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F41C6BD-7DF5-46AD-B0E7-4E4CECA2B9BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F41C6BD-7DF5-46AD-B0E7-4E4CECA2B9BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F41C6BD-7DF5-46AD-B0E7-4E4CECA2B9BF}.Release|Any CPU.Build.0 = Release|Any CPU - {2B5B1AC7-7254-4527-B0F0-8F0A203CB625}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B5B1AC7-7254-4527-B0F0-8F0A203CB625}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B5B1AC7-7254-4527-B0F0-8F0A203CB625}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B5B1AC7-7254-4527-B0F0-8F0A203CB625}.Release|Any CPU.Build.0 = Release|Any CPU {836ABCEF-C16B-4331-B8D5-0EA75E4101FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {836ABCEF-C16B-4331-B8D5-0EA75E4101FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {836ABCEF-C16B-4331-B8D5-0EA75E4101FE}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -126,13 +106,8 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {9781DA05-517E-46D7-9F8B-2C01AA74F1E4} = {F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22} - {9F41C6BD-7DF5-46AD-B0E7-4E4CECA2B9BF} = {F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22} - {2B5B1AC7-7254-4527-B0F0-8F0A203CB625} = {F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22} {836ABCEF-C16B-4331-B8D5-0EA75E4101FE} = {F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22} {72F46822-5815-48E0-9E2C-F95A4D58CB3F} = {F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22} - {9E2EF0B0-2A92-489B-8910-070C871197B0} = {F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22} - {B232D7BB-396A-46FE-B6D2-95041412C835} = {9E2EF0B0-2A92-489B-8910-070C871197B0} {B155D1D9-4F6E-42AE-A8F0-92CD50BF182D} = {EEA1463E-71F8-44E6-8055-787DAA5E62D2} {25F28E3C-84F0-44D6-8EB2-259398C2D14A} = {EEA1463E-71F8-44E6-8055-787DAA5E62D2} {4AF4767C-1BF5-4B86-9050-F05ABF6AF4BE} = {EEA1463E-71F8-44E6-8055-787DAA5E62D2} @@ -143,6 +118,7 @@ Global {B1C5EFF3-B6EF-4B8F-B392-0E1AA2D81533} = {E6B8D5DB-DA05-42EA-8DD0-EAE366870126} {ABEB4337-3606-4730-8ABE-94DF98C2C348} = {EEA1463E-71F8-44E6-8055-787DAA5E62D2} {62DB02EA-D720-46DC-BB78-13771E6D9A12} = {E6B8D5DB-DA05-42EA-8DD0-EAE366870126} + {B232D7BB-396A-46FE-B6D2-95041412C835} = {F01E4DC8-2A8B-4CB9-893A-B3B8FF2EFE22} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/application/account-management/AccountManagement.slnf b/application/account-management/AccountManagement.slnf index 946adce31..a27cbb443 100644 --- a/application/account-management/AccountManagement.slnf +++ b/application/account-management/AccountManagement.slnf @@ -4,10 +4,7 @@ "projects": [ "AppHost\\AppHost.csproj", "AppGateway\\AppGateway.csproj", - "shared-kernel\\DomainCore\\SharedKernel.DomainCore.csproj", - "shared-kernel\\ApplicationCore\\SharedKernel.ApplicationCore.csproj", - "shared-kernel\\InfrastructureCore\\SharedKernel.InfrastructureCore.csproj", - "shared-kernel\\ApiCore\\SharedKernel.ApiCore.csproj", + "shared-kernel\\SharedKernel\\SharedKernel.csproj", "shared-kernel\\Tests\\SharedKernel.Tests.csproj", "account-management\\Core\\AccountManagement.Core.csproj", "account-management\\Workers\\AccountManagement.Workers.csproj", diff --git a/application/account-management/Api/AccountManagement.Api.csproj b/application/account-management/Api/AccountManagement.Api.csproj index b62ed7bce..7e3da2915 100644 --- a/application/account-management/Api/AccountManagement.Api.csproj +++ b/application/account-management/Api/AccountManagement.Api.csproj @@ -17,7 +17,7 @@ - + diff --git a/application/account-management/Api/Authentication/AuthenticationEndpoints.cs b/application/account-management/Api/Authentication/AuthenticationEndpoints.cs index 0a11be8c7..2b690fce4 100644 --- a/application/account-management/Api/Authentication/AuthenticationEndpoints.cs +++ b/application/account-management/Api/Authentication/AuthenticationEndpoints.cs @@ -1,7 +1,7 @@ using PlatformPlatform.AccountManagement.Core.Authentication.Commands; using PlatformPlatform.AccountManagement.Core.Authentication.Domain; -using PlatformPlatform.SharedKernel.ApiCore.ApiResults; -using PlatformPlatform.SharedKernel.ApiCore.Endpoints; +using PlatformPlatform.SharedKernel.ApiResults; +using PlatformPlatform.SharedKernel.Endpoints; namespace PlatformPlatform.AccountManagement.Api.Authentication; diff --git a/application/account-management/Api/Program.cs b/application/account-management/Api/Program.cs index e9aca4405..1a9588b9b 100644 --- a/application/account-management/Api/Program.cs +++ b/application/account-management/Api/Program.cs @@ -1,6 +1,6 @@ using PlatformPlatform.AccountManagement.Core; -using PlatformPlatform.SharedKernel.ApiCore; -using PlatformPlatform.SharedKernel.ApiCore.SinglePageApp; +using PlatformPlatform.SharedKernel; +using PlatformPlatform.SharedKernel.SinglePageApp; var builder = WebApplication.CreateBuilder(args); diff --git a/application/account-management/Api/Signups/SignupEndpoints.cs b/application/account-management/Api/Signups/SignupEndpoints.cs index a691f1734..215c0eb0c 100644 --- a/application/account-management/Api/Signups/SignupEndpoints.cs +++ b/application/account-management/Api/Signups/SignupEndpoints.cs @@ -1,8 +1,8 @@ using PlatformPlatform.AccountManagement.Core.Signups.Commands; using PlatformPlatform.AccountManagement.Core.Signups.Domain; using PlatformPlatform.AccountManagement.Core.Signups.Queries; -using PlatformPlatform.SharedKernel.ApiCore.ApiResults; -using PlatformPlatform.SharedKernel.ApiCore.Endpoints; +using PlatformPlatform.SharedKernel.ApiResults; +using PlatformPlatform.SharedKernel.Endpoints; namespace PlatformPlatform.AccountManagement.Api.Signups; diff --git a/application/account-management/Api/Tenants/TenantEndpoints.cs b/application/account-management/Api/Tenants/TenantEndpoints.cs index ce7d2fb8f..4c4f8e78b 100644 --- a/application/account-management/Api/Tenants/TenantEndpoints.cs +++ b/application/account-management/Api/Tenants/TenantEndpoints.cs @@ -1,8 +1,8 @@ using PlatformPlatform.AccountManagement.Core.Tenants.Commands; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; using PlatformPlatform.AccountManagement.Core.Tenants.Queries; -using PlatformPlatform.SharedKernel.ApiCore.ApiResults; -using PlatformPlatform.SharedKernel.ApiCore.Endpoints; +using PlatformPlatform.SharedKernel.ApiResults; +using PlatformPlatform.SharedKernel.Endpoints; namespace PlatformPlatform.AccountManagement.Api.Tenants; diff --git a/application/account-management/Api/Users/UserEndpoints.cs b/application/account-management/Api/Users/UserEndpoints.cs index c64f90bf5..a1a323e4e 100644 --- a/application/account-management/Api/Users/UserEndpoints.cs +++ b/application/account-management/Api/Users/UserEndpoints.cs @@ -1,8 +1,8 @@ using PlatformPlatform.AccountManagement.Core.Users.Commands; using PlatformPlatform.AccountManagement.Core.Users.Domain; using PlatformPlatform.AccountManagement.Core.Users.Queries; -using PlatformPlatform.SharedKernel.ApiCore.ApiResults; -using PlatformPlatform.SharedKernel.ApiCore.Endpoints; +using PlatformPlatform.SharedKernel.ApiResults; +using PlatformPlatform.SharedKernel.Endpoints; namespace PlatformPlatform.AccountManagement.Api.Users; diff --git a/application/account-management/Core/AccountManagement.Core.csproj b/application/account-management/Core/AccountManagement.Core.csproj index 0eb459959..7e2918f78 100644 --- a/application/account-management/Core/AccountManagement.Core.csproj +++ b/application/account-management/Core/AccountManagement.Core.csproj @@ -9,12 +9,7 @@ - - - - - - + diff --git a/application/account-management/Core/Authentication/Commands/CompleteLogin.cs b/application/account-management/Core/Authentication/Commands/CompleteLogin.cs index 1c9f26cd9..8940b5be1 100644 --- a/application/account-management/Core/Authentication/Commands/CompleteLogin.cs +++ b/application/account-management/Core/Authentication/Commands/CompleteLogin.cs @@ -2,9 +2,9 @@ using PlatformPlatform.AccountManagement.Core.Authentication.Services; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Authentication; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Authentication.Commands; diff --git a/application/account-management/Core/Authentication/Commands/Logut.cs b/application/account-management/Core/Authentication/Commands/Logut.cs index 008ab31c3..85d7b43b2 100644 --- a/application/account-management/Core/Authentication/Commands/Logut.cs +++ b/application/account-management/Core/Authentication/Commands/Logut.cs @@ -3,8 +3,8 @@ using PlatformPlatform.AccountManagement.Core.Authentication.Services; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Authentication.Commands; diff --git a/application/account-management/Core/Authentication/Commands/RefreshAuthenticationTokens.cs b/application/account-management/Core/Authentication/Commands/RefreshAuthenticationTokens.cs index c0fb4f69f..21d77ff38 100644 --- a/application/account-management/Core/Authentication/Commands/RefreshAuthenticationTokens.cs +++ b/application/account-management/Core/Authentication/Commands/RefreshAuthenticationTokens.cs @@ -4,8 +4,8 @@ using PlatformPlatform.AccountManagement.Core.Authentication.Services; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Authentication.Commands; diff --git a/application/account-management/Core/Authentication/Commands/StartLogin.cs b/application/account-management/Core/Authentication/Commands/StartLogin.cs index 9f034eddb..6757e350a 100644 --- a/application/account-management/Core/Authentication/Commands/StartLogin.cs +++ b/application/account-management/Core/Authentication/Commands/StartLogin.cs @@ -3,11 +3,11 @@ using PlatformPlatform.AccountManagement.Core.Authentication.Domain; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Authentication; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.Services; +using PlatformPlatform.SharedKernel.TelemetryEvents; +using PlatformPlatform.SharedKernel.Validation; namespace PlatformPlatform.AccountManagement.Core.Authentication.Commands; diff --git a/application/account-management/Core/Authentication/Domain/ILoginProcessRepository.cs b/application/account-management/Core/Authentication/Domain/ILoginProcessRepository.cs index 912bf692b..8fb461406 100644 --- a/application/account-management/Core/Authentication/Domain/ILoginProcessRepository.cs +++ b/application/account-management/Core/Authentication/Domain/ILoginProcessRepository.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; namespace PlatformPlatform.AccountManagement.Core.Authentication.Domain; diff --git a/application/account-management/Core/Authentication/Domain/Login.cs b/application/account-management/Core/Authentication/Domain/Login.cs index 95b4ffe34..2c83f1d42 100644 --- a/application/account-management/Core/Authentication/Domain/Login.cs +++ b/application/account-management/Core/Authentication/Domain/Login.cs @@ -1,8 +1,8 @@ using JetBrains.Annotations; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.DomainCore.Entities; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Entities; +using PlatformPlatform.SharedKernel.Identity; namespace PlatformPlatform.AccountManagement.Core.Authentication.Domain; diff --git a/application/account-management/Core/Authentication/Domain/LoginProcessRepository.cs b/application/account-management/Core/Authentication/Domain/LoginProcessRepository.cs index ae70ee4d8..efff5fc0b 100644 --- a/application/account-management/Core/Authentication/Domain/LoginProcessRepository.cs +++ b/application/account-management/Core/Authentication/Domain/LoginProcessRepository.cs @@ -1,5 +1,5 @@ using PlatformPlatform.AccountManagement.Core.Database; -using PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +using PlatformPlatform.SharedKernel.Persistence; namespace PlatformPlatform.AccountManagement.Core.Authentication.Domain; diff --git a/application/account-management/Core/Authentication/Services/AuthenticationTokenGenerator.cs b/application/account-management/Core/Authentication/Services/AuthenticationTokenGenerator.cs index 55dce913d..fed124d6c 100644 --- a/application/account-management/Core/Authentication/Services/AuthenticationTokenGenerator.cs +++ b/application/account-management/Core/Authentication/Services/AuthenticationTokenGenerator.cs @@ -2,7 +2,7 @@ using System.Security.Claims; using Microsoft.IdentityModel.Tokens; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +using PlatformPlatform.SharedKernel.Authentication; namespace PlatformPlatform.AccountManagement.Core.Authentication.Services; diff --git a/application/account-management/Core/Authentication/Services/AuthenticationTokenService.cs b/application/account-management/Core/Authentication/Services/AuthenticationTokenService.cs index 69b752fba..43ba478e4 100644 --- a/application/account-management/Core/Authentication/Services/AuthenticationTokenService.cs +++ b/application/account-management/Core/Authentication/Services/AuthenticationTokenService.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Http; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +using PlatformPlatform.SharedKernel.Authentication; namespace PlatformPlatform.AccountManagement.Core.Authentication.Services; diff --git a/application/account-management/Core/Database/AccountManagementDbContext.cs b/application/account-management/Core/Database/AccountManagementDbContext.cs index 30c1e67f9..695f9887a 100644 --- a/application/account-management/Core/Database/AccountManagementDbContext.cs +++ b/application/account-management/Core/Database/AccountManagementDbContext.cs @@ -3,7 +3,7 @@ using PlatformPlatform.AccountManagement.Core.Signups.Domain; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.InfrastructureCore.EntityFramework; +using PlatformPlatform.SharedKernel.EntityFramework; namespace PlatformPlatform.AccountManagement.Core.Database; diff --git a/application/account-management/Core/DependencyConfiguration.cs b/application/account-management/Core/DependencyConfiguration.cs index bd30d4065..d55a1f606 100644 --- a/application/account-management/Core/DependencyConfiguration.cs +++ b/application/account-management/Core/DependencyConfiguration.cs @@ -3,8 +3,7 @@ using Microsoft.Extensions.Hosting; using PlatformPlatform.AccountManagement.Core.Authentication.Services; using PlatformPlatform.AccountManagement.Core.Database; -using PlatformPlatform.SharedKernel.ApplicationCore; -using PlatformPlatform.SharedKernel.InfrastructureCore; +using PlatformPlatform.SharedKernel; namespace PlatformPlatform.AccountManagement.Core; @@ -15,7 +14,7 @@ public static class DependencyConfiguration public static IServiceCollection AddServices(this IServiceCollection services, IConfiguration configuration) { services.AddApplicationCoreServices(Assembly); - services.ConfigureInfrastructureCoreServices(Assembly); + services.AddInfrastructureCoreServices(Assembly); services.AddHttpContextAccessor(); diff --git a/application/account-management/Core/Signups/Commands/CompleteSignup.cs b/application/account-management/Core/Signups/Commands/CompleteSignup.cs index 841c3453f..caf732451 100644 --- a/application/account-management/Core/Signups/Commands/CompleteSignup.cs +++ b/application/account-management/Core/Signups/Commands/CompleteSignup.cs @@ -1,9 +1,9 @@ using PlatformPlatform.AccountManagement.Core.Signups.Domain; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Authentication; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Signups.Commands; diff --git a/application/account-management/Core/Signups/Commands/StartSignup.cs b/application/account-management/Core/Signups/Commands/StartSignup.cs index 77da4ba15..7b794643d 100644 --- a/application/account-management/Core/Signups/Commands/StartSignup.cs +++ b/application/account-management/Core/Signups/Commands/StartSignup.cs @@ -3,11 +3,11 @@ using PlatformPlatform.AccountManagement.Core.Signups.Domain; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Authentication; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.Services; +using PlatformPlatform.SharedKernel.TelemetryEvents; +using PlatformPlatform.SharedKernel.Validation; namespace PlatformPlatform.AccountManagement.Core.Signups.Commands; diff --git a/application/account-management/Core/Signups/Domain/ISignupRepository.cs b/application/account-management/Core/Signups/Domain/ISignupRepository.cs index d924a2a1e..de56a7e26 100644 --- a/application/account-management/Core/Signups/Domain/ISignupRepository.cs +++ b/application/account-management/Core/Signups/Domain/ISignupRepository.cs @@ -1,5 +1,5 @@ using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; namespace PlatformPlatform.AccountManagement.Core.Signups.Domain; diff --git a/application/account-management/Core/Signups/Domain/Signup.cs b/application/account-management/Core/Signups/Domain/Signup.cs index a46434ee9..1b8ba0cfa 100644 --- a/application/account-management/Core/Signups/Domain/Signup.cs +++ b/application/account-management/Core/Signups/Domain/Signup.cs @@ -1,7 +1,7 @@ using JetBrains.Annotations; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.DomainCore.Entities; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Entities; +using PlatformPlatform.SharedKernel.Identity; namespace PlatformPlatform.AccountManagement.Core.Signups.Domain; diff --git a/application/account-management/Core/Signups/Domain/SignupRepository.cs b/application/account-management/Core/Signups/Domain/SignupRepository.cs index b3c88ea63..df82893c8 100644 --- a/application/account-management/Core/Signups/Domain/SignupRepository.cs +++ b/application/account-management/Core/Signups/Domain/SignupRepository.cs @@ -1,6 +1,6 @@ using PlatformPlatform.AccountManagement.Core.Database; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +using PlatformPlatform.SharedKernel.Persistence; namespace PlatformPlatform.AccountManagement.Core.Signups.Domain; diff --git a/application/account-management/Core/Signups/Queries/IsSubdomainFree.cs b/application/account-management/Core/Signups/Queries/IsSubdomainFree.cs index cb9fca2ef..349d88c12 100644 --- a/application/account-management/Core/Signups/Queries/IsSubdomainFree.cs +++ b/application/account-management/Core/Signups/Queries/IsSubdomainFree.cs @@ -1,5 +1,5 @@ using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; namespace PlatformPlatform.AccountManagement.Core.Signups.Queries; diff --git a/application/account-management/Core/TelemetryEvents/TelemetryEvents.cs b/application/account-management/Core/TelemetryEvents/TelemetryEvents.cs index 05c8aad22..58265b0f5 100644 --- a/application/account-management/Core/TelemetryEvents/TelemetryEvents.cs +++ b/application/account-management/Core/TelemetryEvents/TelemetryEvents.cs @@ -1,6 +1,6 @@ using PlatformPlatform.AccountManagement.Core.Tenants.Domain; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.TelemetryEvents; diff --git a/application/account-management/Core/Tenants/Commands/DeleteTenant.cs b/application/account-management/Core/Tenants/Commands/DeleteTenant.cs index 29c2cf9cc..09c745561 100644 --- a/application/account-management/Core/Tenants/Commands/DeleteTenant.cs +++ b/application/account-management/Core/Tenants/Commands/DeleteTenant.cs @@ -2,8 +2,8 @@ using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Tenants.Commands; diff --git a/application/account-management/Core/Tenants/Commands/UpdateTenant.cs b/application/account-management/Core/Tenants/Commands/UpdateTenant.cs index 8fb9d5752..983cad51d 100644 --- a/application/account-management/Core/Tenants/Commands/UpdateTenant.cs +++ b/application/account-management/Core/Tenants/Commands/UpdateTenant.cs @@ -1,8 +1,8 @@ using FluentValidation; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Tenants.Commands; diff --git a/application/account-management/Core/Tenants/Domain/ITenantRepository.cs b/application/account-management/Core/Tenants/Domain/ITenantRepository.cs index 69e75f142..9e09ea690 100644 --- a/application/account-management/Core/Tenants/Domain/ITenantRepository.cs +++ b/application/account-management/Core/Tenants/Domain/ITenantRepository.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; namespace PlatformPlatform.AccountManagement.Core.Tenants.Domain; diff --git a/application/account-management/Core/Tenants/Domain/Tenant.cs b/application/account-management/Core/Tenants/Domain/Tenant.cs index 076af0366..cf2529929 100644 --- a/application/account-management/Core/Tenants/Domain/Tenant.cs +++ b/application/account-management/Core/Tenants/Domain/Tenant.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; namespace PlatformPlatform.AccountManagement.Core.Tenants.Domain; diff --git a/application/account-management/Core/Tenants/Domain/TenantEvents.cs b/application/account-management/Core/Tenants/Domain/TenantEvents.cs index ec4465b56..6bec2dbdb 100644 --- a/application/account-management/Core/Tenants/Domain/TenantEvents.cs +++ b/application/account-management/Core/Tenants/Domain/TenantEvents.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.DomainCore.DomainEvents; +using PlatformPlatform.SharedKernel.DomainEvents; namespace PlatformPlatform.AccountManagement.Core.Tenants.Domain; diff --git a/application/account-management/Core/Tenants/Domain/TenantRepository.cs b/application/account-management/Core/Tenants/Domain/TenantRepository.cs index 3d271dd2f..828e2a09c 100644 --- a/application/account-management/Core/Tenants/Domain/TenantRepository.cs +++ b/application/account-management/Core/Tenants/Domain/TenantRepository.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using PlatformPlatform.AccountManagement.Core.Database; -using PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +using PlatformPlatform.SharedKernel.Persistence; namespace PlatformPlatform.AccountManagement.Core.Tenants.Domain; diff --git a/application/account-management/Core/Tenants/Domain/TenantTypes.cs b/application/account-management/Core/Tenants/Domain/TenantTypes.cs index 69b67b588..d8617747a 100644 --- a/application/account-management/Core/Tenants/Domain/TenantTypes.cs +++ b/application/account-management/Core/Tenants/Domain/TenantTypes.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; namespace PlatformPlatform.AccountManagement.Core.Tenants.Domain; diff --git a/application/account-management/Core/Tenants/Queries/GetTenant.cs b/application/account-management/Core/Tenants/Queries/GetTenant.cs index bf4518b9c..02199598b 100644 --- a/application/account-management/Core/Tenants/Queries/GetTenant.cs +++ b/application/account-management/Core/Tenants/Queries/GetTenant.cs @@ -1,6 +1,6 @@ using Mapster; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; namespace PlatformPlatform.AccountManagement.Core.Tenants.Queries; diff --git a/application/account-management/Core/Users/Commands/ChangeUserRole.cs b/application/account-management/Core/Users/Commands/ChangeUserRole.cs index 52e634dc1..47e239834 100644 --- a/application/account-management/Core/Users/Commands/ChangeUserRole.cs +++ b/application/account-management/Core/Users/Commands/ChangeUserRole.cs @@ -1,7 +1,7 @@ using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Users.Commands; diff --git a/application/account-management/Core/Users/Commands/CreateUser.cs b/application/account-management/Core/Users/Commands/CreateUser.cs index 255872718..42e92cf0c 100644 --- a/application/account-management/Core/Users/Commands/CreateUser.cs +++ b/application/account-management/Core/Users/Commands/CreateUser.cs @@ -5,9 +5,9 @@ using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; +using PlatformPlatform.SharedKernel.Validation; namespace PlatformPlatform.AccountManagement.Core.Users.Commands; diff --git a/application/account-management/Core/Users/Commands/DeleteUser.cs b/application/account-management/Core/Users/Commands/DeleteUser.cs index 7b7b46b1e..9fcbda62a 100644 --- a/application/account-management/Core/Users/Commands/DeleteUser.cs +++ b/application/account-management/Core/Users/Commands/DeleteUser.cs @@ -1,7 +1,7 @@ using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Users.Commands; diff --git a/application/account-management/Core/Users/Commands/RemoveAvatar.cs b/application/account-management/Core/Users/Commands/RemoveAvatar.cs index cff9c7e1d..a1b7dbdcd 100644 --- a/application/account-management/Core/Users/Commands/RemoveAvatar.cs +++ b/application/account-management/Core/Users/Commands/RemoveAvatar.cs @@ -1,7 +1,7 @@ using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Users.Commands; diff --git a/application/account-management/Core/Users/Commands/UpdateAvatar.cs b/application/account-management/Core/Users/Commands/UpdateAvatar.cs index ff01be09d..cb8ba43c6 100644 --- a/application/account-management/Core/Users/Commands/UpdateAvatar.cs +++ b/application/account-management/Core/Users/Commands/UpdateAvatar.cs @@ -3,9 +3,9 @@ using Microsoft.Extensions.DependencyInjection; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.Services; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Core.Users.Commands; diff --git a/application/account-management/Core/Users/Commands/UpdateUser.cs b/application/account-management/Core/Users/Commands/UpdateUser.cs index 860b6b00c..f94477896 100644 --- a/application/account-management/Core/Users/Commands/UpdateUser.cs +++ b/application/account-management/Core/Users/Commands/UpdateUser.cs @@ -1,9 +1,9 @@ using FluentValidation; using PlatformPlatform.AccountManagement.Core.TelemetryEvents; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; +using PlatformPlatform.SharedKernel.Validation; namespace PlatformPlatform.AccountManagement.Core.Users.Commands; diff --git a/application/account-management/Core/Users/Domain/IUserRepository.cs b/application/account-management/Core/Users/Domain/IUserRepository.cs index 5bc41db66..70858b3c4 100644 --- a/application/account-management/Core/Users/Domain/IUserRepository.cs +++ b/application/account-management/Core/Users/Domain/IUserRepository.cs @@ -1,6 +1,6 @@ using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.DomainCore.Entities; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; +using PlatformPlatform.SharedKernel.Entities; +using PlatformPlatform.SharedKernel.Persistence; namespace PlatformPlatform.AccountManagement.Core.Users.Domain; diff --git a/application/account-management/Core/Users/Domain/User.cs b/application/account-management/Core/Users/Domain/User.cs index bc638e850..93383759f 100644 --- a/application/account-management/Core/Users/Domain/User.cs +++ b/application/account-management/Core/Users/Domain/User.cs @@ -1,5 +1,5 @@ using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; namespace PlatformPlatform.AccountManagement.Core.Users.Domain; diff --git a/application/account-management/Core/Users/Domain/UserRepository.cs b/application/account-management/Core/Users/Domain/UserRepository.cs index 3455f8d61..e5c08d7c9 100644 --- a/application/account-management/Core/Users/Domain/UserRepository.cs +++ b/application/account-management/Core/Users/Domain/UserRepository.cs @@ -1,8 +1,7 @@ using Microsoft.EntityFrameworkCore; using PlatformPlatform.AccountManagement.Core.Database; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; -using PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +using PlatformPlatform.SharedKernel.Persistence; namespace PlatformPlatform.AccountManagement.Core.Users.Domain; diff --git a/application/account-management/Core/Users/Domain/UserTypes.cs b/application/account-management/Core/Users/Domain/UserTypes.cs index 852d42ab4..bb9662f4c 100644 --- a/application/account-management/Core/Users/Domain/UserTypes.cs +++ b/application/account-management/Core/Users/Domain/UserTypes.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; namespace PlatformPlatform.AccountManagement.Core.Users.Domain; diff --git a/application/account-management/Core/Users/Queries/GetUser.cs b/application/account-management/Core/Users/Queries/GetUser.cs index 3a9f0ffd2..7e831aa15 100644 --- a/application/account-management/Core/Users/Queries/GetUser.cs +++ b/application/account-management/Core/Users/Queries/GetUser.cs @@ -1,6 +1,6 @@ using Mapster; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; namespace PlatformPlatform.AccountManagement.Core.Users.Queries; diff --git a/application/account-management/Core/Users/Queries/GetUsers.cs b/application/account-management/Core/Users/Queries/GetUsers.cs index 9955a4870..caafb7949 100644 --- a/application/account-management/Core/Users/Queries/GetUsers.cs +++ b/application/account-management/Core/Users/Queries/GetUsers.cs @@ -1,8 +1,8 @@ using FluentValidation; using Mapster; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.Persistence; namespace PlatformPlatform.AccountManagement.Core.Users.Queries; diff --git a/application/account-management/Tests/Api/BaseApiTest.cs b/application/account-management/Tests/Api/BaseApiTest.cs index a3cad4892..1e128050b 100644 --- a/application/account-management/Tests/Api/BaseApiTest.cs +++ b/application/account-management/Tests/Api/BaseApiTest.cs @@ -7,11 +7,11 @@ using Microsoft.AspNetCore.TestHost; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; -using PlatformPlatform.SharedKernel.ApiCore.ApiResults; -using PlatformPlatform.SharedKernel.ApiCore.SinglePageApp; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.ApiResults; +using PlatformPlatform.SharedKernel.SinglePageApp; +using PlatformPlatform.SharedKernel.TelemetryEvents; using PlatformPlatform.SharedKernel.Tests.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Validation; namespace PlatformPlatform.AccountManagement.Tests.Api; diff --git a/application/account-management/Tests/Api/Signups/SignupTests.cs b/application/account-management/Tests/Api/Signups/SignupTests.cs index 0ea3b82f5..8fdd1a318 100644 --- a/application/account-management/Tests/Api/Signups/SignupTests.cs +++ b/application/account-management/Tests/Api/Signups/SignupTests.cs @@ -4,7 +4,7 @@ using NSubstitute; using PlatformPlatform.AccountManagement.Core.Database; using PlatformPlatform.AccountManagement.Core.Signups.Commands; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Validation; using Xunit; namespace PlatformPlatform.AccountManagement.Tests.Api.Signups; diff --git a/application/account-management/Tests/Api/Tenants/TenantEndpointsTests.cs b/application/account-management/Tests/Api/Tenants/TenantEndpointsTests.cs index b846da9fa..016731424 100644 --- a/application/account-management/Tests/Api/Tenants/TenantEndpointsTests.cs +++ b/application/account-management/Tests/Api/Tenants/TenantEndpointsTests.cs @@ -4,7 +4,7 @@ using NJsonSchema; using PlatformPlatform.AccountManagement.Core.Database; using PlatformPlatform.AccountManagement.Core.Tenants.Commands; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Validation; using Xunit; namespace PlatformPlatform.AccountManagement.Tests.Api.Tenants; diff --git a/application/account-management/Tests/Api/Users/UserEndpointsTests.cs b/application/account-management/Tests/Api/Users/UserEndpointsTests.cs index 8ee416db4..e8c04d05c 100644 --- a/application/account-management/Tests/Api/Users/UserEndpointsTests.cs +++ b/application/account-management/Tests/Api/Users/UserEndpointsTests.cs @@ -6,7 +6,7 @@ using PlatformPlatform.AccountManagement.Core.Users.Commands; using PlatformPlatform.AccountManagement.Core.Users.Domain; using PlatformPlatform.AccountManagement.Core.Users.Queries; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Validation; using Xunit; namespace PlatformPlatform.AccountManagement.Tests.Api.Users; diff --git a/application/account-management/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs b/application/account-management/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs index 166176762..88ecf8438 100644 --- a/application/account-management/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs +++ b/application/account-management/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs @@ -1,7 +1,7 @@ using FluentAssertions; using NetArchTest.Rules; using PlatformPlatform.AccountManagement.Core; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; using Xunit; namespace PlatformPlatform.AccountManagement.Tests.ArchitectureTests; diff --git a/application/account-management/Tests/ArchitectureTests/PublicClassesTests.cs b/application/account-management/Tests/ArchitectureTests/PublicClassesTests.cs index 90f8c41b1..74023042e 100644 --- a/application/account-management/Tests/ArchitectureTests/PublicClassesTests.cs +++ b/application/account-management/Tests/ArchitectureTests/PublicClassesTests.cs @@ -1,7 +1,7 @@ using FluentAssertions; using NetArchTest.Rules; using PlatformPlatform.AccountManagement.Core; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; using Xunit; namespace PlatformPlatform.AccountManagement.Tests.ArchitectureTests; diff --git a/application/account-management/Tests/BaseTest.cs b/application/account-management/Tests/BaseTest.cs index da6b39181..549ccda79 100644 --- a/application/account-management/Tests/BaseTest.cs +++ b/application/account-management/Tests/BaseTest.cs @@ -12,8 +12,8 @@ using NSubstitute; using PlatformPlatform.AccountManagement.Core; using PlatformPlatform.AccountManagement.Core.Authentication.Services; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Services; +using PlatformPlatform.SharedKernel.TelemetryEvents; using PlatformPlatform.SharedKernel.Tests.ApplicationCore.TelemetryEvents; namespace PlatformPlatform.AccountManagement.Tests; diff --git a/application/account-management/Tests/DatabaseSeeder.cs b/application/account-management/Tests/DatabaseSeeder.cs index 2c6efe923..ec0c18720 100644 --- a/application/account-management/Tests/DatabaseSeeder.cs +++ b/application/account-management/Tests/DatabaseSeeder.cs @@ -4,7 +4,7 @@ using PlatformPlatform.AccountManagement.Core.Signups.Domain; using PlatformPlatform.AccountManagement.Core.Tenants.Domain; using PlatformPlatform.AccountManagement.Core.Users.Domain; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +using PlatformPlatform.SharedKernel.Authentication; namespace PlatformPlatform.AccountManagement.Tests; diff --git a/application/account-management/Tests/FakerExtensions.cs b/application/account-management/Tests/FakerExtensions.cs index cfa2033a0..b8811d5b9 100644 --- a/application/account-management/Tests/FakerExtensions.cs +++ b/application/account-management/Tests/FakerExtensions.cs @@ -1,5 +1,5 @@ using Bogus; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; namespace PlatformPlatform.AccountManagement.Tests; diff --git a/application/account-management/Workers/AccountManagement.Workers.csproj b/application/account-management/Workers/AccountManagement.Workers.csproj index 6e772869c..f703c5f92 100644 --- a/application/account-management/Workers/AccountManagement.Workers.csproj +++ b/application/account-management/Workers/AccountManagement.Workers.csproj @@ -10,7 +10,7 @@ - + diff --git a/application/account-management/Workers/Program.cs b/application/account-management/Workers/Program.cs index d2c07a711..ddba7d5c0 100644 --- a/application/account-management/Workers/Program.cs +++ b/application/account-management/Workers/Program.cs @@ -1,7 +1,6 @@ using PlatformPlatform.AccountManagement.Core; using PlatformPlatform.AccountManagement.Core.Database; -using PlatformPlatform.SharedKernel.ApiCore; -using PlatformPlatform.SharedKernel.InfrastructureCore; +using PlatformPlatform.SharedKernel; // Worker service is using WebApplication.CreateBuilder instead of Host.CreateDefaultBuilder to allow scaling to zero var builder = WebApplication.CreateBuilder(args); diff --git a/application/back-office/Api/BackOffice.Api.csproj b/application/back-office/Api/BackOffice.Api.csproj index 19bdf7722..c642c3c45 100644 --- a/application/back-office/Api/BackOffice.Api.csproj +++ b/application/back-office/Api/BackOffice.Api.csproj @@ -17,7 +17,7 @@ - + diff --git a/application/back-office/Api/Program.cs b/application/back-office/Api/Program.cs index 3a505d2be..65a5c9900 100644 --- a/application/back-office/Api/Program.cs +++ b/application/back-office/Api/Program.cs @@ -1,6 +1,6 @@ using PlatformPlatform.BackOffice.Core; -using PlatformPlatform.SharedKernel.ApiCore; -using PlatformPlatform.SharedKernel.ApiCore.SinglePageApp; +using PlatformPlatform.SharedKernel; +using PlatformPlatform.SharedKernel.SinglePageApp; var builder = WebApplication.CreateBuilder(args); diff --git a/application/back-office/BackOffice.slnf b/application/back-office/BackOffice.slnf index 593a6d79d..27561e505 100644 --- a/application/back-office/BackOffice.slnf +++ b/application/back-office/BackOffice.slnf @@ -4,10 +4,7 @@ "projects": [ "AppHost\\AppHost.csproj", "AppGateway\\AppGateway.csproj", - "shared-kernel\\DomainCore\\SharedKernel.DomainCore.csproj", - "shared-kernel\\ApplicationCore\\SharedKernel.ApplicationCore.csproj", - "shared-kernel\\InfrastructureCore\\SharedKernel.InfrastructureCore.csproj", - "shared-kernel\\ApiCore\\SharedKernel.ApiCore.csproj", + "shared-kernel\\SharedKernel\\SharedKernel.csproj", "shared-kernel\\Tests\\SharedKernel.Tests.csproj", "back-office\\Core\\BackOffice.Core.csproj", "back-office\\Workers\\BackOffice.Workers.csproj", diff --git a/application/back-office/Core/BackOffice.Core.csproj b/application/back-office/Core/BackOffice.Core.csproj index c819aee7e..56ae71e60 100644 --- a/application/back-office/Core/BackOffice.Core.csproj +++ b/application/back-office/Core/BackOffice.Core.csproj @@ -9,8 +9,7 @@ - - + diff --git a/application/back-office/Core/Database/BackOfficeDbContext.cs b/application/back-office/Core/Database/BackOfficeDbContext.cs index b91ab36d0..27ce7ca00 100644 --- a/application/back-office/Core/Database/BackOfficeDbContext.cs +++ b/application/back-office/Core/Database/BackOfficeDbContext.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.InfrastructureCore.EntityFramework; +using PlatformPlatform.SharedKernel.EntityFramework; namespace PlatformPlatform.BackOffice.Core.Database; diff --git a/application/back-office/Core/DependencyConfiguration.cs b/application/back-office/Core/DependencyConfiguration.cs index aa075a475..3c0909714 100644 --- a/application/back-office/Core/DependencyConfiguration.cs +++ b/application/back-office/Core/DependencyConfiguration.cs @@ -1,8 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using PlatformPlatform.BackOffice.Core.Database; -using PlatformPlatform.SharedKernel.ApplicationCore; -using PlatformPlatform.SharedKernel.InfrastructureCore; +using PlatformPlatform.SharedKernel; namespace PlatformPlatform.BackOffice.Core; @@ -13,7 +12,7 @@ public static class DependencyConfiguration public static IServiceCollection AddServices(this IServiceCollection services) { services.AddApplicationCoreServices(Assembly); - services.ConfigureInfrastructureCoreServices(Assembly); + services.AddInfrastructureCoreServices(Assembly); return services; } diff --git a/application/back-office/Tests/Api/BaseApiTest.cs b/application/back-office/Tests/Api/BaseApiTest.cs index 9238223cc..3d694778d 100644 --- a/application/back-office/Tests/Api/BaseApiTest.cs +++ b/application/back-office/Tests/Api/BaseApiTest.cs @@ -6,11 +6,11 @@ using Microsoft.AspNetCore.TestHost; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; -using PlatformPlatform.SharedKernel.ApiCore.ApiResults; -using PlatformPlatform.SharedKernel.ApiCore.SinglePageApp; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.ApiResults; +using PlatformPlatform.SharedKernel.SinglePageApp; +using PlatformPlatform.SharedKernel.TelemetryEvents; using PlatformPlatform.SharedKernel.Tests.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Validation; namespace PlatformPlatform.BackOffice.Tests.Api; @@ -27,7 +27,7 @@ protected BaseApiTests() { builder.ConfigureTestServices(services => { - // Replace the default DbContext in the WebApplication to use an in-memory SQLite database + // Replace the default DbContext in the WebApplication to use an in-memory SQLite database services.Remove(services.Single(d => d.ServiceType == typeof(DbContextOptions))); services.AddDbContext(options => { options.UseSqlite(Connection); }); diff --git a/application/back-office/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs b/application/back-office/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs index 58bbae03b..aa90d95cb 100644 --- a/application/back-office/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs +++ b/application/back-office/Tests/ArchitectureTests/IdPrefixForAllStronglyTypedUlidTests.cs @@ -1,7 +1,7 @@ using FluentAssertions; using NetArchTest.Rules; using PlatformPlatform.BackOffice.Core; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; using Xunit; namespace PlatformPlatform.BackOffice.Tests.ArchitectureTests; diff --git a/application/back-office/Tests/ArchitectureTests/PublicClassesTests.cs b/application/back-office/Tests/ArchitectureTests/PublicClassesTests.cs index 2a6ea7b25..e222c0f3a 100644 --- a/application/back-office/Tests/ArchitectureTests/PublicClassesTests.cs +++ b/application/back-office/Tests/ArchitectureTests/PublicClassesTests.cs @@ -1,7 +1,7 @@ using FluentAssertions; using NetArchTest.Rules; using PlatformPlatform.BackOffice.Core; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; using Xunit; namespace PlatformPlatform.BackOffice.Tests.ArchitectureTests; diff --git a/application/back-office/Tests/BaseTest.cs b/application/back-office/Tests/BaseTest.cs index 6e96f820f..fd471ee83 100644 --- a/application/back-office/Tests/BaseTest.cs +++ b/application/back-office/Tests/BaseTest.cs @@ -10,8 +10,8 @@ using Microsoft.Extensions.Options; using NSubstitute; using PlatformPlatform.BackOffice.Core; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Services; +using PlatformPlatform.SharedKernel.TelemetryEvents; using PlatformPlatform.SharedKernel.Tests.ApplicationCore.TelemetryEvents; namespace PlatformPlatform.BackOffice.Tests; diff --git a/application/back-office/Tests/FakerExtensions.cs b/application/back-office/Tests/FakerExtensions.cs index b1a7edede..c85ddf9b1 100644 --- a/application/back-office/Tests/FakerExtensions.cs +++ b/application/back-office/Tests/FakerExtensions.cs @@ -1,5 +1,5 @@ using Bogus; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; namespace PlatformPlatform.BackOffice.Tests; diff --git a/application/back-office/Workers/BackOffice.Workers.csproj b/application/back-office/Workers/BackOffice.Workers.csproj index 6797f1f0d..adae84c9b 100644 --- a/application/back-office/Workers/BackOffice.Workers.csproj +++ b/application/back-office/Workers/BackOffice.Workers.csproj @@ -10,7 +10,7 @@ - + diff --git a/application/back-office/Workers/Program.cs b/application/back-office/Workers/Program.cs index b97f444d4..69da6aef9 100644 --- a/application/back-office/Workers/Program.cs +++ b/application/back-office/Workers/Program.cs @@ -1,7 +1,6 @@ using PlatformPlatform.BackOffice.Core; using PlatformPlatform.BackOffice.Core.Database; -using PlatformPlatform.SharedKernel.ApiCore; -using PlatformPlatform.SharedKernel.InfrastructureCore; +using PlatformPlatform.SharedKernel; // Worker service is using WebApplication.CreateBuilder instead of Host.CreateDefaultBuilder to allow scaling to zero var builder = WebApplication.CreateBuilder(args); diff --git a/application/shared-kernel/ApiCore/SharedKernel.ApiCore.csproj b/application/shared-kernel/ApiCore/SharedKernel.ApiCore.csproj deleted file mode 100644 index 260cf5756..000000000 --- a/application/shared-kernel/ApiCore/SharedKernel.ApiCore.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - Library - net8.0 - enable - enable - true - PlatformPlatform.SharedKernel.ApiCore - PlatformPlatform.SharedKernel.ApiCore - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/shared-kernel/ApplicationCore/ApplicationCoreConfiguration.cs b/application/shared-kernel/ApplicationCore/ApplicationCoreConfiguration.cs deleted file mode 100644 index 8d226b6b9..000000000 --- a/application/shared-kernel/ApplicationCore/ApplicationCoreConfiguration.cs +++ /dev/null @@ -1,31 +0,0 @@ -using FluentValidation; -using Microsoft.AspNetCore.Identity; -using Microsoft.Extensions.DependencyInjection; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; -using PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; - -namespace PlatformPlatform.SharedKernel.ApplicationCore; - -public static class ApplicationCoreConfiguration -{ - public static IServiceCollection AddApplicationCoreServices(this IServiceCollection services, Assembly applicationAssembly) - { - // Order is important! First all Pre behaviors run, then the command is handled, then all Post behaviors run. - // So Validation -> Command -> PublishDomainEvents -> UnitOfWork -> PublishTelemetryEvents. - services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationPipelineBehavior<,>)); // Pre - services.AddTransient(typeof(IPipelineBehavior<,>), typeof(PublishTelemetryEventsPipelineBehavior<,>)); // Post - services.AddTransient(typeof(IPipelineBehavior<,>), typeof(UnitOfWorkPipelineBehavior<,>)); // Post - services.AddTransient(typeof(IPipelineBehavior<,>), typeof(PublishDomainEventsPipelineBehavior<,>)); // Post - services.AddScoped(); - services.AddScoped(); - - services.AddMediatR(configuration => configuration.RegisterServicesFromAssemblies(applicationAssembly)); - services.AddValidatorsFromAssembly(applicationAssembly); - - services.AddScoped, PasswordHasher>(); - services.AddScoped(); - - return services; - } -} diff --git a/application/shared-kernel/ApplicationCore/SharedKernel.ApplicationCore.csproj b/application/shared-kernel/ApplicationCore/SharedKernel.ApplicationCore.csproj deleted file mode 100644 index 68f1f574f..000000000 --- a/application/shared-kernel/ApplicationCore/SharedKernel.ApplicationCore.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net8.0 - enable - enable - PlatformPlatform.SharedKernel.ApplicationCore - PlatformPlatform.SharedKernel.ApplicationCore - - - - - - - - - - - - - - - - diff --git a/application/shared-kernel/ApplicationCore/Validation/ErrorDetail.cs b/application/shared-kernel/ApplicationCore/Validation/ErrorDetail.cs deleted file mode 100644 index ea04d40fd..000000000 --- a/application/shared-kernel/ApplicationCore/Validation/ErrorDetail.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.Validation; - -public sealed record ErrorDetail(string? Code, string Message); diff --git a/application/shared-kernel/ApplicationCore/Validation/ErrorMessage.cs b/application/shared-kernel/ApplicationCore/Validation/ErrorMessage.cs deleted file mode 100644 index 8f0f1d28b..000000000 --- a/application/shared-kernel/ApplicationCore/Validation/ErrorMessage.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.Validation; - -public sealed record ErrorMessage(string Message); diff --git a/application/shared-kernel/DomainCore/DomainEvents/IDomainEventCollector.cs b/application/shared-kernel/DomainCore/DomainEvents/IDomainEventCollector.cs deleted file mode 100644 index 6cfae9c86..000000000 --- a/application/shared-kernel/DomainCore/DomainEvents/IDomainEventCollector.cs +++ /dev/null @@ -1,8 +0,0 @@ -using PlatformPlatform.SharedKernel.DomainCore.Entities; - -namespace PlatformPlatform.SharedKernel.DomainCore.DomainEvents; - -public interface IDomainEventCollector -{ - IAggregateRoot[] GetAggregatesWithDomainEvents(); -} diff --git a/application/shared-kernel/DomainCore/Persistence/SortOrder.cs b/application/shared-kernel/DomainCore/Persistence/SortOrder.cs deleted file mode 100644 index 6350ff234..000000000 --- a/application/shared-kernel/DomainCore/Persistence/SortOrder.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Persistence; - -public enum SortOrder -{ - Ascending, - Descending -} diff --git a/application/shared-kernel/DomainCore/SharedKernel.DomainCore.csproj b/application/shared-kernel/DomainCore/SharedKernel.DomainCore.csproj deleted file mode 100644 index d6370cf2d..000000000 --- a/application/shared-kernel/DomainCore/SharedKernel.DomainCore.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - net8.0 - enable - enable - PlatformPlatform.SharedKernel.DomainCore - PlatformPlatform.SharedKernel.DomainCore - - - - - - - - - - - diff --git a/application/shared-kernel/InfrastructureCore/SharedKernel.InfrastructureCore.csproj b/application/shared-kernel/InfrastructureCore/SharedKernel.InfrastructureCore.csproj deleted file mode 100644 index 1668a11f5..000000000 --- a/application/shared-kernel/InfrastructureCore/SharedKernel.InfrastructureCore.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - - net8.0 - enable - enable - PlatformPlatform.SharedKernel.InfrastructureCore - PlatformPlatform.SharedKernel.InfrastructureCore - platformplatform-f817f2a1-ac57-4756-aef2-a57ca864bbd3 - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - diff --git a/application/shared-kernel/ApiCore/ApiCoreConfiguration.cs b/application/shared-kernel/SharedKernel/ApiCoreConfiguration.cs similarity index 94% rename from application/shared-kernel/ApiCore/ApiCoreConfiguration.cs rename to application/shared-kernel/SharedKernel/ApiCoreConfiguration.cs index bd7f9cc33..141b183ed 100644 --- a/application/shared-kernel/ApiCore/ApiCoreConfiguration.cs +++ b/application/shared-kernel/SharedKernel/ApiCoreConfiguration.cs @@ -9,15 +9,14 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using NJsonSchema.Generation; -using PlatformPlatform.SharedKernel.ApiCore.Aspire; -using PlatformPlatform.SharedKernel.ApiCore.Endpoints; -using PlatformPlatform.SharedKernel.ApiCore.Filters; -using PlatformPlatform.SharedKernel.ApiCore.Middleware; -using PlatformPlatform.SharedKernel.ApiCore.SchemaProcessor; -using PlatformPlatform.SharedKernel.ApiCore.SinglePageApp; -using PlatformPlatform.SharedKernel.InfrastructureCore; - -namespace PlatformPlatform.SharedKernel.ApiCore; +using PlatformPlatform.SharedKernel.Aspire; +using PlatformPlatform.SharedKernel.Endpoints; +using PlatformPlatform.SharedKernel.Filters; +using PlatformPlatform.SharedKernel.Middleware; +using PlatformPlatform.SharedKernel.SchemaProcessor; +using PlatformPlatform.SharedKernel.SinglePageApp; + +namespace PlatformPlatform.SharedKernel; public static class ApiCoreConfiguration { diff --git a/application/shared-kernel/ApiCore/ApiResults/ApiResult.cs b/application/shared-kernel/SharedKernel/ApiResults/ApiResult.cs similarity index 94% rename from application/shared-kernel/ApiCore/ApiResults/ApiResult.cs rename to application/shared-kernel/SharedKernel/ApiResults/ApiResult.cs index 5a56a0c4d..359d3cb2f 100644 --- a/application/shared-kernel/ApiCore/ApiResults/ApiResult.cs +++ b/application/shared-kernel/SharedKernel/ApiResults/ApiResult.cs @@ -2,9 +2,9 @@ using System.Text.RegularExpressions; using Mapster; using Microsoft.AspNetCore.Http; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; -namespace PlatformPlatform.SharedKernel.ApiCore.ApiResults; +namespace PlatformPlatform.SharedKernel.ApiResults; public class ApiResult(ResultBase result, string? routePrefix = null) : IResult { diff --git a/application/shared-kernel/ApiCore/ApiResults/ApiResultExtensions.cs b/application/shared-kernel/SharedKernel/ApiResults/ApiResultExtensions.cs similarity index 63% rename from application/shared-kernel/ApiCore/ApiResults/ApiResultExtensions.cs rename to application/shared-kernel/SharedKernel/ApiResults/ApiResultExtensions.cs index 464281ba8..62e03a2c1 100644 --- a/application/shared-kernel/ApiCore/ApiResults/ApiResultExtensions.cs +++ b/application/shared-kernel/SharedKernel/ApiResults/ApiResultExtensions.cs @@ -1,6 +1,6 @@ -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; -namespace PlatformPlatform.SharedKernel.ApiCore.ApiResults; +namespace PlatformPlatform.SharedKernel.ApiResults; public static class ApiResultExtensions { diff --git a/application/shared-kernel/ApiCore/Aspire/ServiceDefaultsExtensions.cs b/application/shared-kernel/SharedKernel/Aspire/ServiceDefaultsExtensions.cs similarity index 97% rename from application/shared-kernel/ApiCore/Aspire/ServiceDefaultsExtensions.cs rename to application/shared-kernel/SharedKernel/Aspire/ServiceDefaultsExtensions.cs index 285866a00..9684ac80d 100644 --- a/application/shared-kernel/ApiCore/Aspire/ServiceDefaultsExtensions.cs +++ b/application/shared-kernel/SharedKernel/Aspire/ServiceDefaultsExtensions.cs @@ -6,9 +6,9 @@ using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; -using PlatformPlatform.SharedKernel.ApiCore.Filters; +using PlatformPlatform.SharedKernel.Filters; -namespace PlatformPlatform.SharedKernel.ApiCore.Aspire; +namespace PlatformPlatform.SharedKernel.Aspire; public static class ServiceDefaultsExtensions { diff --git a/application/shared-kernel/ApplicationCore/Authentication/AuthenticationTokenHttpKeys.cs b/application/shared-kernel/SharedKernel/Authentication/AuthenticationTokenHttpKeys.cs similarity index 81% rename from application/shared-kernel/ApplicationCore/Authentication/AuthenticationTokenHttpKeys.cs rename to application/shared-kernel/SharedKernel/Authentication/AuthenticationTokenHttpKeys.cs index e73573c65..e2ea0fb5d 100644 --- a/application/shared-kernel/ApplicationCore/Authentication/AuthenticationTokenHttpKeys.cs +++ b/application/shared-kernel/SharedKernel/Authentication/AuthenticationTokenHttpKeys.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +namespace PlatformPlatform.SharedKernel.Authentication; public static class AuthenticationTokenHttpKeys { diff --git a/application/shared-kernel/ApplicationCore/Authentication/ITokenSigningService.cs b/application/shared-kernel/SharedKernel/Authentication/ITokenSigningService.cs similarity index 80% rename from application/shared-kernel/ApplicationCore/Authentication/ITokenSigningService.cs rename to application/shared-kernel/SharedKernel/Authentication/ITokenSigningService.cs index 39031126d..0f4d75b99 100644 --- a/application/shared-kernel/ApplicationCore/Authentication/ITokenSigningService.cs +++ b/application/shared-kernel/SharedKernel/Authentication/ITokenSigningService.cs @@ -1,6 +1,6 @@ using Microsoft.IdentityModel.Tokens; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +namespace PlatformPlatform.SharedKernel.Authentication; public interface ITokenSigningService { diff --git a/application/shared-kernel/ApplicationCore/Authentication/OneTimePasswordHelper.cs b/application/shared-kernel/SharedKernel/Authentication/OneTimePasswordHelper.cs similarity index 94% rename from application/shared-kernel/ApplicationCore/Authentication/OneTimePasswordHelper.cs rename to application/shared-kernel/SharedKernel/Authentication/OneTimePasswordHelper.cs index c271afb2b..3d31b5eae 100644 --- a/application/shared-kernel/ApplicationCore/Authentication/OneTimePasswordHelper.cs +++ b/application/shared-kernel/SharedKernel/Authentication/OneTimePasswordHelper.cs @@ -2,7 +2,7 @@ using System.Text; using Microsoft.AspNetCore.Identity; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +namespace PlatformPlatform.SharedKernel.Authentication; public class OneTimePasswordHelper(IPasswordHasher passwordHasher) { diff --git a/application/shared-kernel/ApplicationCore/Authentication/UserInfo.cs b/application/shared-kernel/SharedKernel/Authentication/UserInfo.cs similarity index 95% rename from application/shared-kernel/ApplicationCore/Authentication/UserInfo.cs rename to application/shared-kernel/SharedKernel/Authentication/UserInfo.cs index 4c92b0bc3..b5154f7d0 100644 --- a/application/shared-kernel/ApplicationCore/Authentication/UserInfo.cs +++ b/application/shared-kernel/SharedKernel/Authentication/UserInfo.cs @@ -1,6 +1,6 @@ using System.Security.Claims; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +namespace PlatformPlatform.SharedKernel.Authentication; public class UserInfo { diff --git a/application/shared-kernel/ApplicationCore/Behaviors/ConcurrentCommandCounter.cs b/application/shared-kernel/SharedKernel/Behaviors/ConcurrentCommandCounter.cs similarity index 93% rename from application/shared-kernel/ApplicationCore/Behaviors/ConcurrentCommandCounter.cs rename to application/shared-kernel/SharedKernel/Behaviors/ConcurrentCommandCounter.cs index 6dcc76a33..a701be360 100644 --- a/application/shared-kernel/ApplicationCore/Behaviors/ConcurrentCommandCounter.cs +++ b/application/shared-kernel/SharedKernel/Behaviors/ConcurrentCommandCounter.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; +namespace PlatformPlatform.SharedKernel.Behaviors; /// /// The ConcurrentCommandCounter class is a concurrent counter used to count the number of concurrent commands that diff --git a/application/shared-kernel/ApplicationCore/Behaviors/PublishDomainEventsPipelineBehavior.cs b/application/shared-kernel/SharedKernel/Behaviors/PublishDomainEventsPipelineBehavior.cs similarity index 89% rename from application/shared-kernel/ApplicationCore/Behaviors/PublishDomainEventsPipelineBehavior.cs rename to application/shared-kernel/SharedKernel/Behaviors/PublishDomainEventsPipelineBehavior.cs index 595b77e89..ef3f164b7 100644 --- a/application/shared-kernel/ApplicationCore/Behaviors/PublishDomainEventsPipelineBehavior.cs +++ b/application/shared-kernel/SharedKernel/Behaviors/PublishDomainEventsPipelineBehavior.cs @@ -1,7 +1,7 @@ -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.DomainCore.DomainEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.DomainEvents; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; +namespace PlatformPlatform.SharedKernel.Behaviors; /// /// This method publishes any domain events were generated during the execution of a command (and added to aggregates). diff --git a/application/shared-kernel/ApplicationCore/Behaviors/PublishTelemetryEventsPipelineBehavior.cs b/application/shared-kernel/SharedKernel/Behaviors/PublishTelemetryEventsPipelineBehavior.cs similarity index 82% rename from application/shared-kernel/ApplicationCore/Behaviors/PublishTelemetryEventsPipelineBehavior.cs rename to application/shared-kernel/SharedKernel/Behaviors/PublishTelemetryEventsPipelineBehavior.cs index 1ac3c852c..76a1525cd 100644 --- a/application/shared-kernel/ApplicationCore/Behaviors/PublishTelemetryEventsPipelineBehavior.cs +++ b/application/shared-kernel/SharedKernel/Behaviors/PublishTelemetryEventsPipelineBehavior.cs @@ -1,8 +1,8 @@ using Microsoft.ApplicationInsights; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.TelemetryEvents; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; +namespace PlatformPlatform.SharedKernel.Behaviors; public sealed class PublishTelemetryEventsPipelineBehavior( ITelemetryEventsCollector telemetryEventsCollector, diff --git a/application/shared-kernel/ApplicationCore/Behaviors/UnitOfWorkPipelineBehavior.cs b/application/shared-kernel/SharedKernel/Behaviors/UnitOfWorkPipelineBehavior.cs similarity index 87% rename from application/shared-kernel/ApplicationCore/Behaviors/UnitOfWorkPipelineBehavior.cs rename to application/shared-kernel/SharedKernel/Behaviors/UnitOfWorkPipelineBehavior.cs index cc84ca26c..81c0ae4e5 100644 --- a/application/shared-kernel/ApplicationCore/Behaviors/UnitOfWorkPipelineBehavior.cs +++ b/application/shared-kernel/SharedKernel/Behaviors/UnitOfWorkPipelineBehavior.cs @@ -1,7 +1,7 @@ -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.Persistence; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; +namespace PlatformPlatform.SharedKernel.Behaviors; /// /// The UnitOfWorkPipelineBehavior class is a MediatR pipeline behavior that encapsulates the unit of work pattern. diff --git a/application/shared-kernel/ApplicationCore/Behaviors/ValidationPipelineBehavior.cs b/application/shared-kernel/SharedKernel/Behaviors/ValidationPipelineBehavior.cs similarity index 91% rename from application/shared-kernel/ApplicationCore/Behaviors/ValidationPipelineBehavior.cs rename to application/shared-kernel/SharedKernel/Behaviors/ValidationPipelineBehavior.cs index f489a4cbe..8fa682c6b 100644 --- a/application/shared-kernel/ApplicationCore/Behaviors/ValidationPipelineBehavior.cs +++ b/application/shared-kernel/SharedKernel/Behaviors/ValidationPipelineBehavior.cs @@ -1,9 +1,9 @@ using System.Net; using FluentValidation; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.Validation; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; +namespace PlatformPlatform.SharedKernel.Behaviors; /// /// The ValidationPipelineBehavior class is a MediatR pipeline behavior that validates the request using diff --git a/application/shared-kernel/ApplicationCore/Cqrs/ICommand.cs b/application/shared-kernel/SharedKernel/Cqrs/ICommand.cs similarity index 72% rename from application/shared-kernel/ApplicationCore/Cqrs/ICommand.cs rename to application/shared-kernel/SharedKernel/Cqrs/ICommand.cs index df26e8989..987d07ce8 100644 --- a/application/shared-kernel/ApplicationCore/Cqrs/ICommand.cs +++ b/application/shared-kernel/SharedKernel/Cqrs/ICommand.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +namespace PlatformPlatform.SharedKernel.Cqrs; /// /// A marker interface for commands, that ensures that only Commands are processed by pipeline behaviors. diff --git a/application/shared-kernel/ApplicationCore/Cqrs/Result.cs b/application/shared-kernel/SharedKernel/Cqrs/Result.cs similarity index 97% rename from application/shared-kernel/ApplicationCore/Cqrs/Result.cs rename to application/shared-kernel/SharedKernel/Cqrs/Result.cs index b06902895..f359e5219 100644 --- a/application/shared-kernel/ApplicationCore/Cqrs/Result.cs +++ b/application/shared-kernel/SharedKernel/Cqrs/Result.cs @@ -1,7 +1,7 @@ using System.Net; -using PlatformPlatform.SharedKernel.ApplicationCore.Validation; +using PlatformPlatform.SharedKernel.Validation; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +namespace PlatformPlatform.SharedKernel.Cqrs; public abstract class ResultBase { diff --git a/application/shared-kernel/DomainCore/DomainEvents/IDomainEvent.cs b/application/shared-kernel/SharedKernel/DomainEvents/IDomainEvent.cs similarity index 95% rename from application/shared-kernel/DomainCore/DomainEvents/IDomainEvent.cs rename to application/shared-kernel/SharedKernel/DomainEvents/IDomainEvent.cs index e0786a1fd..a86cf3f25 100644 --- a/application/shared-kernel/DomainCore/DomainEvents/IDomainEvent.cs +++ b/application/shared-kernel/SharedKernel/DomainEvents/IDomainEvent.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.DomainEvents; +namespace PlatformPlatform.SharedKernel.DomainEvents; /// /// The DomainEvent interface represents a domain event that occurred in the domain. The DomainEvent implements the diff --git a/application/shared-kernel/SharedKernel/DomainEvents/IDomainEventCollector.cs b/application/shared-kernel/SharedKernel/DomainEvents/IDomainEventCollector.cs new file mode 100644 index 000000000..28e6e96e8 --- /dev/null +++ b/application/shared-kernel/SharedKernel/DomainEvents/IDomainEventCollector.cs @@ -0,0 +1,8 @@ +using PlatformPlatform.SharedKernel.Entities; + +namespace PlatformPlatform.SharedKernel.DomainEvents; + +public interface IDomainEventCollector +{ + IAggregateRoot[] GetAggregatesWithDomainEvents(); +} diff --git a/application/shared-kernel/ApiCore/Endpoints/HealthEndpoints.cs b/application/shared-kernel/SharedKernel/Endpoints/HealthEndpoints.cs similarity index 91% rename from application/shared-kernel/ApiCore/Endpoints/HealthEndpoints.cs rename to application/shared-kernel/SharedKernel/Endpoints/HealthEndpoints.cs index 05cc7b169..5d171b1a9 100644 --- a/application/shared-kernel/ApiCore/Endpoints/HealthEndpoints.cs +++ b/application/shared-kernel/SharedKernel/Endpoints/HealthEndpoints.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Routing; -namespace PlatformPlatform.SharedKernel.ApiCore.Endpoints; +namespace PlatformPlatform.SharedKernel.Endpoints; public class HealthEndpoints : IEndpoints { diff --git a/application/shared-kernel/ApiCore/Endpoints/IEndpoints.cs b/application/shared-kernel/SharedKernel/Endpoints/IEndpoints.cs similarity index 68% rename from application/shared-kernel/ApiCore/Endpoints/IEndpoints.cs rename to application/shared-kernel/SharedKernel/Endpoints/IEndpoints.cs index a07cb29e8..fb20e451b 100644 --- a/application/shared-kernel/ApiCore/Endpoints/IEndpoints.cs +++ b/application/shared-kernel/SharedKernel/Endpoints/IEndpoints.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Routing; -namespace PlatformPlatform.SharedKernel.ApiCore.Endpoints; +namespace PlatformPlatform.SharedKernel.Endpoints; public interface IEndpoints { diff --git a/application/shared-kernel/ApiCore/Endpoints/TestEndpoints.cs b/application/shared-kernel/SharedKernel/Endpoints/TestEndpoints.cs similarity index 92% rename from application/shared-kernel/ApiCore/Endpoints/TestEndpoints.cs rename to application/shared-kernel/SharedKernel/Endpoints/TestEndpoints.cs index 431ec00f8..ea7a96c0b 100644 --- a/application/shared-kernel/ApiCore/Endpoints/TestEndpoints.cs +++ b/application/shared-kernel/SharedKernel/Endpoints/TestEndpoints.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Routing; -namespace PlatformPlatform.SharedKernel.ApiCore.Endpoints; +namespace PlatformPlatform.SharedKernel.Endpoints; public class TestEndpoints : IEndpoints { diff --git a/application/shared-kernel/ApiCore/Endpoints/TrackEndpoints.cs b/application/shared-kernel/SharedKernel/Endpoints/TrackEndpoints.cs similarity index 99% rename from application/shared-kernel/ApiCore/Endpoints/TrackEndpoints.cs rename to application/shared-kernel/SharedKernel/Endpoints/TrackEndpoints.cs index 0738b689d..8e58e19cd 100644 --- a/application/shared-kernel/ApiCore/Endpoints/TrackEndpoints.cs +++ b/application/shared-kernel/SharedKernel/Endpoints/TrackEndpoints.cs @@ -7,7 +7,7 @@ using NSwag.Annotations; using StackFrame = Microsoft.ApplicationInsights.DataContracts.StackFrame; -namespace PlatformPlatform.SharedKernel.ApiCore.Endpoints; +namespace PlatformPlatform.SharedKernel.Endpoints; public class TrackEndpoints : IEndpoints { diff --git a/application/shared-kernel/DomainCore/Entities/AggregateRoot.cs b/application/shared-kernel/SharedKernel/Entities/AggregateRoot.cs similarity index 92% rename from application/shared-kernel/DomainCore/Entities/AggregateRoot.cs rename to application/shared-kernel/SharedKernel/Entities/AggregateRoot.cs index 678e0ae0f..c3f1ff928 100644 --- a/application/shared-kernel/DomainCore/Entities/AggregateRoot.cs +++ b/application/shared-kernel/SharedKernel/Entities/AggregateRoot.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations.Schema; -using PlatformPlatform.SharedKernel.DomainCore.DomainEvents; +using PlatformPlatform.SharedKernel.DomainEvents; -namespace PlatformPlatform.SharedKernel.DomainCore.Entities; +namespace PlatformPlatform.SharedKernel.Entities; /// /// Interface for aggregate roots, which also implements IAuditableEntity. Aggregate roots are a concept in diff --git a/application/shared-kernel/DomainCore/Entities/AudibleEntity.cs b/application/shared-kernel/SharedKernel/Entities/AudibleEntity.cs similarity index 93% rename from application/shared-kernel/DomainCore/Entities/AudibleEntity.cs rename to application/shared-kernel/SharedKernel/Entities/AudibleEntity.cs index d7e03f545..0f4f8d208 100644 --- a/application/shared-kernel/DomainCore/Entities/AudibleEntity.cs +++ b/application/shared-kernel/SharedKernel/Entities/AudibleEntity.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace PlatformPlatform.SharedKernel.DomainCore.Entities; +namespace PlatformPlatform.SharedKernel.Entities; /// /// The AudibleEntity class extends Entity and implements IAuditableEntity, which adds diff --git a/application/shared-kernel/DomainCore/Entities/Entity.cs b/application/shared-kernel/SharedKernel/Entities/Entity.cs similarity index 91% rename from application/shared-kernel/DomainCore/Entities/Entity.cs rename to application/shared-kernel/SharedKernel/Entities/Entity.cs index 8d6f6f574..8ec186a46 100644 --- a/application/shared-kernel/DomainCore/Entities/Entity.cs +++ b/application/shared-kernel/SharedKernel/Entities/Entity.cs @@ -1,8 +1,8 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; -namespace PlatformPlatform.SharedKernel.DomainCore.Entities; +namespace PlatformPlatform.SharedKernel.Entities; /// /// The Entity class is a base class for entities which represents business objects. diff --git a/application/shared-kernel/DomainCore/Entities/EntityEqualityComparer.cs b/application/shared-kernel/SharedKernel/Entities/EntityEqualityComparer.cs similarity index 89% rename from application/shared-kernel/DomainCore/Entities/EntityEqualityComparer.cs rename to application/shared-kernel/SharedKernel/Entities/EntityEqualityComparer.cs index c001eb553..baaf918b8 100644 --- a/application/shared-kernel/DomainCore/Entities/EntityEqualityComparer.cs +++ b/application/shared-kernel/SharedKernel/Entities/EntityEqualityComparer.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Entities; +namespace PlatformPlatform.SharedKernel.Entities; public sealed class EntityEqualityComparer : IEqualityComparer> where T : IComparable { diff --git a/application/shared-kernel/DomainCore/Entities/IAuditableEntity.cs b/application/shared-kernel/SharedKernel/Entities/IAuditableEntity.cs similarity index 85% rename from application/shared-kernel/DomainCore/Entities/IAuditableEntity.cs rename to application/shared-kernel/SharedKernel/Entities/IAuditableEntity.cs index 7783432b9..ef9fa3f7d 100644 --- a/application/shared-kernel/DomainCore/Entities/IAuditableEntity.cs +++ b/application/shared-kernel/SharedKernel/Entities/IAuditableEntity.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Entities; +namespace PlatformPlatform.SharedKernel.Entities; /// /// IAuditableEntity interface contains properties and methods for maintaining audit information for when diff --git a/application/shared-kernel/DomainCore/Entities/ICrudRepository.cs b/application/shared-kernel/SharedKernel/Entities/ICrudRepository.cs similarity index 82% rename from application/shared-kernel/DomainCore/Entities/ICrudRepository.cs rename to application/shared-kernel/SharedKernel/Entities/ICrudRepository.cs index e1dde98b8..2588fa792 100644 --- a/application/shared-kernel/DomainCore/Entities/ICrudRepository.cs +++ b/application/shared-kernel/SharedKernel/Entities/ICrudRepository.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Entities; +namespace PlatformPlatform.SharedKernel.Entities; public interface ICrudRepository where T : IAggregateRoot { diff --git a/application/shared-kernel/InfrastructureCore/EntityFramework/ModelBuilderExtensions.cs b/application/shared-kernel/SharedKernel/EntityFramework/ModelBuilderExtensions.cs similarity index 96% rename from application/shared-kernel/InfrastructureCore/EntityFramework/ModelBuilderExtensions.cs rename to application/shared-kernel/SharedKernel/EntityFramework/ModelBuilderExtensions.cs index 14a830e36..9014911a3 100644 --- a/application/shared-kernel/InfrastructureCore/EntityFramework/ModelBuilderExtensions.cs +++ b/application/shared-kernel/SharedKernel/EntityFramework/ModelBuilderExtensions.cs @@ -1,9 +1,9 @@ using System.Linq.Expressions; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.EntityFramework; +namespace PlatformPlatform.SharedKernel.EntityFramework; public static class ModelBuilderExtensions { diff --git a/application/shared-kernel/InfrastructureCore/EntityFramework/SharedKernelDbContext.cs b/application/shared-kernel/SharedKernel/EntityFramework/SharedKernelDbContext.cs similarity index 88% rename from application/shared-kernel/InfrastructureCore/EntityFramework/SharedKernelDbContext.cs rename to application/shared-kernel/SharedKernel/EntityFramework/SharedKernelDbContext.cs index ccab42523..ed30acad5 100644 --- a/application/shared-kernel/InfrastructureCore/EntityFramework/SharedKernelDbContext.cs +++ b/application/shared-kernel/SharedKernel/EntityFramework/SharedKernelDbContext.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.EntityFramework; +namespace PlatformPlatform.SharedKernel.EntityFramework; /// /// The SharedKernelDbContext class represents the Entity Framework Core DbContext for managing data access to the diff --git a/application/shared-kernel/InfrastructureCore/EntityFramework/UpdateAuditableEntitiesInterceptor.cs b/application/shared-kernel/SharedKernel/EntityFramework/UpdateAuditableEntitiesInterceptor.cs similarity index 93% rename from application/shared-kernel/InfrastructureCore/EntityFramework/UpdateAuditableEntitiesInterceptor.cs rename to application/shared-kernel/SharedKernel/EntityFramework/UpdateAuditableEntitiesInterceptor.cs index 77fda4e85..066791b67 100644 --- a/application/shared-kernel/InfrastructureCore/EntityFramework/UpdateAuditableEntitiesInterceptor.cs +++ b/application/shared-kernel/SharedKernel/EntityFramework/UpdateAuditableEntitiesInterceptor.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Diagnostics; -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.EntityFramework; +namespace PlatformPlatform.SharedKernel.EntityFramework; /// /// The UpdateAuditableEntitiesInterceptor is a SaveChangesInterceptor that updates the ModifiedAt property diff --git a/application/shared-kernel/ApiCore/Filters/EndpointTelemetryFilter.cs b/application/shared-kernel/SharedKernel/Filters/EndpointTelemetryFilter.cs similarity index 93% rename from application/shared-kernel/ApiCore/Filters/EndpointTelemetryFilter.cs rename to application/shared-kernel/SharedKernel/Filters/EndpointTelemetryFilter.cs index 864825b3f..e7a5e7258 100644 --- a/application/shared-kernel/ApiCore/Filters/EndpointTelemetryFilter.cs +++ b/application/shared-kernel/SharedKernel/Filters/EndpointTelemetryFilter.cs @@ -2,7 +2,7 @@ using Microsoft.ApplicationInsights.DataContracts; using Microsoft.ApplicationInsights.Extensibility; -namespace PlatformPlatform.SharedKernel.ApiCore.Filters; +namespace PlatformPlatform.SharedKernel.Filters; /// /// Filter out telemetry from requests matching excluded paths diff --git a/application/shared-kernel/DomainCore/Identity/IdGenerator.cs b/application/shared-kernel/SharedKernel/Identity/IdGenerator.cs similarity index 97% rename from application/shared-kernel/DomainCore/Identity/IdGenerator.cs rename to application/shared-kernel/SharedKernel/Identity/IdGenerator.cs index 668bdaee2..343dbd046 100644 --- a/application/shared-kernel/DomainCore/Identity/IdGenerator.cs +++ b/application/shared-kernel/SharedKernel/Identity/IdGenerator.cs @@ -1,7 +1,7 @@ using System.Net; using System.Net.Sockets; -namespace PlatformPlatform.SharedKernel.DomainCore.Identity; +namespace PlatformPlatform.SharedKernel.Identity; /// /// IdGenerator is a utility that can generate IDs in a low-latency, distributed, uncoordinated, roughly diff --git a/application/shared-kernel/DomainCore/Identity/IdPrefixAttribute.cs b/application/shared-kernel/SharedKernel/Identity/IdPrefixAttribute.cs similarity index 71% rename from application/shared-kernel/DomainCore/Identity/IdPrefixAttribute.cs rename to application/shared-kernel/SharedKernel/Identity/IdPrefixAttribute.cs index 3ace97069..b4a1d6b69 100644 --- a/application/shared-kernel/DomainCore/Identity/IdPrefixAttribute.cs +++ b/application/shared-kernel/SharedKernel/Identity/IdPrefixAttribute.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Identity; +namespace PlatformPlatform.SharedKernel.Identity; [AttributeUsage(AttributeTargets.Class)] public sealed class IdPrefixAttribute(string prefix) : Attribute diff --git a/application/shared-kernel/DomainCore/Identity/StronglyTypedId.cs b/application/shared-kernel/SharedKernel/Identity/StronglyTypedId.cs similarity index 95% rename from application/shared-kernel/DomainCore/Identity/StronglyTypedId.cs rename to application/shared-kernel/SharedKernel/Identity/StronglyTypedId.cs index 216921069..d1b727cc6 100644 --- a/application/shared-kernel/DomainCore/Identity/StronglyTypedId.cs +++ b/application/shared-kernel/SharedKernel/Identity/StronglyTypedId.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Identity; +namespace PlatformPlatform.SharedKernel.Identity; /// /// StronglyTypedId is an abstract record type for creating strongly typed IDs with a specified value type. It makes diff --git a/application/shared-kernel/DomainCore/Identity/StronglyTypedIdTypeConverter.cs b/application/shared-kernel/SharedKernel/Identity/StronglyTypedIdTypeConverter.cs similarity index 92% rename from application/shared-kernel/DomainCore/Identity/StronglyTypedIdTypeConverter.cs rename to application/shared-kernel/SharedKernel/Identity/StronglyTypedIdTypeConverter.cs index ad91556ba..3b034d34a 100644 --- a/application/shared-kernel/DomainCore/Identity/StronglyTypedIdTypeConverter.cs +++ b/application/shared-kernel/SharedKernel/Identity/StronglyTypedIdTypeConverter.cs @@ -1,6 +1,6 @@ using System.Globalization; -namespace PlatformPlatform.SharedKernel.DomainCore.Identity; +namespace PlatformPlatform.SharedKernel.Identity; public class StronglyTypedIdTypeConverter : TypeConverter where T : StronglyTypedId where TValue : IComparable diff --git a/application/shared-kernel/DomainCore/Identity/StronglyTypedLongId.cs b/application/shared-kernel/SharedKernel/Identity/StronglyTypedLongId.cs similarity index 94% rename from application/shared-kernel/DomainCore/Identity/StronglyTypedLongId.cs rename to application/shared-kernel/SharedKernel/Identity/StronglyTypedLongId.cs index 5e24b2503..cf110e367 100644 --- a/application/shared-kernel/DomainCore/Identity/StronglyTypedLongId.cs +++ b/application/shared-kernel/SharedKernel/Identity/StronglyTypedLongId.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Identity; +namespace PlatformPlatform.SharedKernel.Identity; /// /// This is a special version of for longs which is the recommended type to use. diff --git a/application/shared-kernel/DomainCore/Identity/StronglyTypedUlid.cs b/application/shared-kernel/SharedKernel/Identity/StronglyTypedUlid.cs similarity index 95% rename from application/shared-kernel/DomainCore/Identity/StronglyTypedUlid.cs rename to application/shared-kernel/SharedKernel/Identity/StronglyTypedUlid.cs index 474c4ed23..75da55664 100644 --- a/application/shared-kernel/DomainCore/Identity/StronglyTypedUlid.cs +++ b/application/shared-kernel/SharedKernel/Identity/StronglyTypedUlid.cs @@ -1,6 +1,6 @@ using NUlid; -namespace PlatformPlatform.SharedKernel.DomainCore.Identity; +namespace PlatformPlatform.SharedKernel.Identity; /// /// This is the recommended ID type to use. It uses the to create unique chronological IDs. diff --git a/application/shared-kernel/InfrastructureCore/InfrastructureCoreConfiguration.cs b/application/shared-kernel/SharedKernel/InfrastructureCoreConfiguration.cs similarity index 82% rename from application/shared-kernel/InfrastructureCore/InfrastructureCoreConfiguration.cs rename to application/shared-kernel/SharedKernel/InfrastructureCoreConfiguration.cs index 3e3750cda..798a10c86 100644 --- a/application/shared-kernel/InfrastructureCore/InfrastructureCoreConfiguration.cs +++ b/application/shared-kernel/SharedKernel/InfrastructureCoreConfiguration.cs @@ -4,19 +4,21 @@ using Azure.Security.KeyVault.Keys.Cryptography; using Azure.Security.KeyVault.Secrets; using Azure.Storage.Blobs; +using FluentValidation; +using Microsoft.AspNetCore.Identity; using Microsoft.Data.SqlClient; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -using PlatformPlatform.SharedKernel.DomainCore.DomainEvents; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; -using PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; -using PlatformPlatform.SharedKernel.InfrastructureCore.Services; +using PlatformPlatform.SharedKernel.Authentication; +using PlatformPlatform.SharedKernel.Behaviors; +using PlatformPlatform.SharedKernel.DomainEvents; +using PlatformPlatform.SharedKernel.Persistence; +using PlatformPlatform.SharedKernel.Services; +using PlatformPlatform.SharedKernel.TelemetryEvents; -namespace PlatformPlatform.SharedKernel.InfrastructureCore; +namespace PlatformPlatform.SharedKernel; public static class InfrastructureCoreConfiguration { @@ -32,6 +34,26 @@ private static DefaultAzureCredential GetDefaultAzureCredential() return new DefaultAzureCredential(credentialOptions); } + public static IServiceCollection AddApplicationCoreServices(this IServiceCollection services, Assembly applicationAssembly) + { + // Order is important! First all Pre behaviors run, then the command is handled, then all Post behaviors run. + // So Validation -> Command -> PublishDomainEvents -> UnitOfWork -> PublishTelemetryEvents. + services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationPipelineBehavior<,>)); // Pre + services.AddTransient(typeof(IPipelineBehavior<,>), typeof(PublishTelemetryEventsPipelineBehavior<,>)); // Post + services.AddTransient(typeof(IPipelineBehavior<,>), typeof(UnitOfWorkPipelineBehavior<,>)); // Post + services.AddTransient(typeof(IPipelineBehavior<,>), typeof(PublishDomainEventsPipelineBehavior<,>)); // Post + services.AddScoped(); + services.AddScoped(); + + services.AddMediatR(configuration => configuration.RegisterServicesFromAssemblies(applicationAssembly)); + services.AddValidatorsFromAssembly(applicationAssembly); + + services.AddScoped, PasswordHasher>(); + services.AddScoped(); + + return services; + } + public static IServiceCollection ConfigureDatabaseContext( this IServiceCollection services, IHostApplicationBuilder builder, @@ -93,7 +115,7 @@ public static IServiceCollection AddNamedBlobStorages( return services; } - public static IServiceCollection ConfigureInfrastructureCoreServices(this IServiceCollection services, Assembly assembly) + public static IServiceCollection AddInfrastructureCoreServices(this IServiceCollection services, Assembly assembly) where T : DbContext { services.AddScoped(provider => new UnitOfWork(provider.GetRequiredService())); diff --git a/application/shared-kernel/ApiCore/Middleware/GlobalExceptionHandler.cs b/application/shared-kernel/SharedKernel/Middleware/GlobalExceptionHandler.cs similarity index 94% rename from application/shared-kernel/ApiCore/Middleware/GlobalExceptionHandler.cs rename to application/shared-kernel/SharedKernel/Middleware/GlobalExceptionHandler.cs index 25b8bccf5..66b9acf84 100644 --- a/application/shared-kernel/ApiCore/Middleware/GlobalExceptionHandler.cs +++ b/application/shared-kernel/SharedKernel/Middleware/GlobalExceptionHandler.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Http; -namespace PlatformPlatform.SharedKernel.ApiCore.Middleware; +namespace PlatformPlatform.SharedKernel.Middleware; public sealed class GlobalExceptionHandler(ILogger logger) : IExceptionHandler { diff --git a/application/shared-kernel/ApiCore/Middleware/ModelBindingExceptionHandlerMiddleware.cs b/application/shared-kernel/SharedKernel/Middleware/ModelBindingExceptionHandlerMiddleware.cs similarity index 90% rename from application/shared-kernel/ApiCore/Middleware/ModelBindingExceptionHandlerMiddleware.cs rename to application/shared-kernel/SharedKernel/Middleware/ModelBindingExceptionHandlerMiddleware.cs index 61ed5a2fe..9e08fddc1 100644 --- a/application/shared-kernel/ApiCore/Middleware/ModelBindingExceptionHandlerMiddleware.cs +++ b/application/shared-kernel/SharedKernel/Middleware/ModelBindingExceptionHandlerMiddleware.cs @@ -1,7 +1,7 @@ using System.Net; using Microsoft.AspNetCore.Http; -namespace PlatformPlatform.SharedKernel.ApiCore.Middleware; +namespace PlatformPlatform.SharedKernel.Middleware; public sealed class ModelBindingExceptionHandlerMiddleware : IMiddleware { diff --git a/application/shared-kernel/ApiCore/Middleware/TimeoutExceptionHandler.cs b/application/shared-kernel/SharedKernel/Middleware/TimeoutExceptionHandler.cs similarity index 95% rename from application/shared-kernel/ApiCore/Middleware/TimeoutExceptionHandler.cs rename to application/shared-kernel/SharedKernel/Middleware/TimeoutExceptionHandler.cs index bcd71e6f2..1f8282d34 100644 --- a/application/shared-kernel/ApiCore/Middleware/TimeoutExceptionHandler.cs +++ b/application/shared-kernel/SharedKernel/Middleware/TimeoutExceptionHandler.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Diagnostics; using Microsoft.AspNetCore.Http; -namespace PlatformPlatform.SharedKernel.ApiCore.Middleware; +namespace PlatformPlatform.SharedKernel.Middleware; public sealed class TimeoutExceptionHandler(ILogger logger) : IExceptionHandler { diff --git a/application/shared-kernel/InfrastructureCore/Persistence/DomainEventCollector.cs b/application/shared-kernel/SharedKernel/Persistence/DomainEventCollector.cs similarity index 67% rename from application/shared-kernel/InfrastructureCore/Persistence/DomainEventCollector.cs rename to application/shared-kernel/SharedKernel/Persistence/DomainEventCollector.cs index c0edab207..06b0b872b 100644 --- a/application/shared-kernel/InfrastructureCore/Persistence/DomainEventCollector.cs +++ b/application/shared-kernel/SharedKernel/Persistence/DomainEventCollector.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.DomainCore.DomainEvents; -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.DomainEvents; +using PlatformPlatform.SharedKernel.Entities; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +namespace PlatformPlatform.SharedKernel.Persistence; public sealed class DomainEventCollector(DbContext dbContext) : IDomainEventCollector { diff --git a/application/shared-kernel/DomainCore/Persistence/IUnitOfWork.cs b/application/shared-kernel/SharedKernel/Persistence/IUnitOfWork.cs similarity index 90% rename from application/shared-kernel/DomainCore/Persistence/IUnitOfWork.cs rename to application/shared-kernel/SharedKernel/Persistence/IUnitOfWork.cs index 8f372bc92..ff0cfddd8 100644 --- a/application/shared-kernel/DomainCore/Persistence/IUnitOfWork.cs +++ b/application/shared-kernel/SharedKernel/Persistence/IUnitOfWork.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.DomainCore.Persistence; +namespace PlatformPlatform.SharedKernel.Persistence; /// /// IUnitOfWork interface provides a method for committing changes made within the unit of work. diff --git a/application/shared-kernel/InfrastructureCore/Persistence/RepositoryBase.cs b/application/shared-kernel/SharedKernel/Persistence/RepositoryBase.cs similarity index 91% rename from application/shared-kernel/InfrastructureCore/Persistence/RepositoryBase.cs rename to application/shared-kernel/SharedKernel/Persistence/RepositoryBase.cs index da17e7df2..377c63779 100644 --- a/application/shared-kernel/InfrastructureCore/Persistence/RepositoryBase.cs +++ b/application/shared-kernel/SharedKernel/Persistence/RepositoryBase.cs @@ -1,8 +1,7 @@ using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.DomainCore.Entities; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; +using PlatformPlatform.SharedKernel.Entities; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +namespace PlatformPlatform.SharedKernel.Persistence; /// /// RepositoryBase contains implementations for generic repository features. Repositories are a DDD concept, and are diff --git a/application/shared-kernel/SharedKernel/Persistence/SortOrder.cs b/application/shared-kernel/SharedKernel/Persistence/SortOrder.cs new file mode 100644 index 000000000..ef39afe0f --- /dev/null +++ b/application/shared-kernel/SharedKernel/Persistence/SortOrder.cs @@ -0,0 +1,7 @@ +namespace PlatformPlatform.SharedKernel.Persistence; + +public enum SortOrder +{ + Ascending, + Descending +} diff --git a/application/shared-kernel/InfrastructureCore/Persistence/UnitOfWork.cs b/application/shared-kernel/SharedKernel/Persistence/UnitOfWork.cs similarity index 77% rename from application/shared-kernel/InfrastructureCore/Persistence/UnitOfWork.cs rename to application/shared-kernel/SharedKernel/Persistence/UnitOfWork.cs index d10f1d2bd..c83f37712 100644 --- a/application/shared-kernel/InfrastructureCore/Persistence/UnitOfWork.cs +++ b/application/shared-kernel/SharedKernel/Persistence/UnitOfWork.cs @@ -1,9 +1,8 @@ using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; -using PlatformPlatform.SharedKernel.DomainCore.Entities; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; +using PlatformPlatform.SharedKernel.Behaviors; +using PlatformPlatform.SharedKernel.Entities; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +namespace PlatformPlatform.SharedKernel.Persistence; /// /// UnitOfWork is an implementation of the IUnitOfWork interface from the Domain layer. It is responsible for diff --git a/application/shared-kernel/ApiCore/SchemaProcessor/StronglyTypedDocumentProcessor.cs b/application/shared-kernel/SharedKernel/SchemaProcessor/StronglyTypedDocumentProcessor.cs similarity index 90% rename from application/shared-kernel/ApiCore/SchemaProcessor/StronglyTypedDocumentProcessor.cs rename to application/shared-kernel/SharedKernel/SchemaProcessor/StronglyTypedDocumentProcessor.cs index 02ca552fc..a59b0148a 100644 --- a/application/shared-kernel/ApiCore/SchemaProcessor/StronglyTypedDocumentProcessor.cs +++ b/application/shared-kernel/SharedKernel/SchemaProcessor/StronglyTypedDocumentProcessor.cs @@ -1,9 +1,9 @@ using NJsonSchema; using NSwag.Generation.Processors; using NSwag.Generation.Processors.Contexts; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; -namespace PlatformPlatform.SharedKernel.ApiCore.SchemaProcessor; +namespace PlatformPlatform.SharedKernel.SchemaProcessor; public class StronglyTypedDocumentProcessor(Assembly domainAssembly) : IDocumentProcessor diff --git a/application/shared-kernel/InfrastructureCore/Services/AzureEmailService.cs b/application/shared-kernel/SharedKernel/Services/AzureEmailService.cs similarity index 86% rename from application/shared-kernel/InfrastructureCore/Services/AzureEmailService.cs rename to application/shared-kernel/SharedKernel/Services/AzureEmailService.cs index d55f5b298..daebd685b 100644 --- a/application/shared-kernel/InfrastructureCore/Services/AzureEmailService.cs +++ b/application/shared-kernel/SharedKernel/Services/AzureEmailService.cs @@ -1,9 +1,8 @@ using Azure; using Azure.Communication.Email; using Azure.Security.KeyVault.Secrets; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Services; +namespace PlatformPlatform.SharedKernel.Services; public sealed class AzureEmailService(SecretClient secretClient) : IEmailService { diff --git a/application/shared-kernel/InfrastructureCore/Services/AzureTokenSigningService.cs b/application/shared-kernel/SharedKernel/Services/AzureTokenSigningService.cs similarity index 88% rename from application/shared-kernel/InfrastructureCore/Services/AzureTokenSigningService.cs rename to application/shared-kernel/SharedKernel/Services/AzureTokenSigningService.cs index 43ae6634d..7f69329f9 100644 --- a/application/shared-kernel/InfrastructureCore/Services/AzureTokenSigningService.cs +++ b/application/shared-kernel/SharedKernel/Services/AzureTokenSigningService.cs @@ -1,8 +1,8 @@ using Azure.Security.KeyVault.Keys.Cryptography; using Microsoft.IdentityModel.Tokens; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +using PlatformPlatform.SharedKernel.Authentication; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Services; +namespace PlatformPlatform.SharedKernel.Services; public class AzureTokenSigningService(CryptographyClient cryptographyClient, string issuer, string audience) : ITokenSigningService diff --git a/application/shared-kernel/InfrastructureCore/Services/BlobStorage.cs b/application/shared-kernel/SharedKernel/Services/BlobStorage.cs similarity index 90% rename from application/shared-kernel/InfrastructureCore/Services/BlobStorage.cs rename to application/shared-kernel/SharedKernel/Services/BlobStorage.cs index 4459edc46..9aa98ae3f 100644 --- a/application/shared-kernel/InfrastructureCore/Services/BlobStorage.cs +++ b/application/shared-kernel/SharedKernel/Services/BlobStorage.cs @@ -1,9 +1,8 @@ using Azure.Storage.Blobs; using Azure.Storage.Blobs.Models; using Azure.Storage.Sas; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Services; +namespace PlatformPlatform.SharedKernel.Services; public class BlobStorage(BlobServiceClient blobServiceClient) : IBlobStorage { diff --git a/application/shared-kernel/InfrastructureCore/Services/DevelopmentEmailService.cs b/application/shared-kernel/SharedKernel/Services/DevelopmentEmailService.cs similarity index 80% rename from application/shared-kernel/InfrastructureCore/Services/DevelopmentEmailService.cs rename to application/shared-kernel/SharedKernel/Services/DevelopmentEmailService.cs index c701acc4e..28bbefb61 100644 --- a/application/shared-kernel/InfrastructureCore/Services/DevelopmentEmailService.cs +++ b/application/shared-kernel/SharedKernel/Services/DevelopmentEmailService.cs @@ -1,7 +1,6 @@ using System.Net.Mail; -using PlatformPlatform.SharedKernel.ApplicationCore.Services; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Services; +namespace PlatformPlatform.SharedKernel.Services; public sealed class DevelopmentEmailService : IEmailService { diff --git a/application/shared-kernel/InfrastructureCore/Services/DevelopmentTokenSigningService.cs b/application/shared-kernel/SharedKernel/Services/DevelopmentTokenSigningService.cs similarity index 92% rename from application/shared-kernel/InfrastructureCore/Services/DevelopmentTokenSigningService.cs rename to application/shared-kernel/SharedKernel/Services/DevelopmentTokenSigningService.cs index 73f280ad6..b6cfe33c5 100644 --- a/application/shared-kernel/InfrastructureCore/Services/DevelopmentTokenSigningService.cs +++ b/application/shared-kernel/SharedKernel/Services/DevelopmentTokenSigningService.cs @@ -1,9 +1,9 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.UserSecrets; using Microsoft.IdentityModel.Tokens; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +using PlatformPlatform.SharedKernel.Authentication; -namespace PlatformPlatform.SharedKernel.InfrastructureCore.Services; +namespace PlatformPlatform.SharedKernel.Services; public class DevelopmentTokenSigningService : ITokenSigningService diff --git a/application/shared-kernel/ApplicationCore/Services/IBlobStorage.cs b/application/shared-kernel/SharedKernel/Services/IBlobStorage.cs similarity index 82% rename from application/shared-kernel/ApplicationCore/Services/IBlobStorage.cs rename to application/shared-kernel/SharedKernel/Services/IBlobStorage.cs index 3b2b69de5..c6b28cfd4 100644 --- a/application/shared-kernel/ApplicationCore/Services/IBlobStorage.cs +++ b/application/shared-kernel/SharedKernel/Services/IBlobStorage.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.Services; +namespace PlatformPlatform.SharedKernel.Services; public interface IBlobStorage { diff --git a/application/shared-kernel/ApplicationCore/Services/IEmailService.cs b/application/shared-kernel/SharedKernel/Services/IEmailService.cs similarity index 69% rename from application/shared-kernel/ApplicationCore/Services/IEmailService.cs rename to application/shared-kernel/SharedKernel/Services/IEmailService.cs index c32466229..6e4b01fa5 100644 --- a/application/shared-kernel/ApplicationCore/Services/IEmailService.cs +++ b/application/shared-kernel/SharedKernel/Services/IEmailService.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.Services; +namespace PlatformPlatform.SharedKernel.Services; public interface IEmailService { diff --git a/application/shared-kernel/SharedKernel/SharedKernel.csproj b/application/shared-kernel/SharedKernel/SharedKernel.csproj new file mode 100644 index 000000000..85e2401ca --- /dev/null +++ b/application/shared-kernel/SharedKernel/SharedKernel.csproj @@ -0,0 +1,64 @@ + + + + Library + net8.0 + enable + enable + true + PlatformPlatform.SharedKernel + PlatformPlatform.SharedKernel + platformplatform-f817f2a1-ac57-4756-aef2-a57ca864bbd3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/application/shared-kernel/ApiCore/SinglePageApp/SinglePageAppConfiguration.cs b/application/shared-kernel/SharedKernel/SinglePageApp/SinglePageAppConfiguration.cs similarity index 99% rename from application/shared-kernel/ApiCore/SinglePageApp/SinglePageAppConfiguration.cs rename to application/shared-kernel/SharedKernel/SinglePageApp/SinglePageAppConfiguration.cs index 49f4af287..4f6a6dead 100644 --- a/application/shared-kernel/ApiCore/SinglePageApp/SinglePageAppConfiguration.cs +++ b/application/shared-kernel/SharedKernel/SinglePageApp/SinglePageAppConfiguration.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; -namespace PlatformPlatform.SharedKernel.ApiCore.SinglePageApp; +namespace PlatformPlatform.SharedKernel.SinglePageApp; public class SinglePageAppConfiguration { diff --git a/application/shared-kernel/ApiCore/SinglePageApp/SinglePageAppFallbackExtensions.cs b/application/shared-kernel/SharedKernel/SinglePageApp/SinglePageAppFallbackExtensions.cs similarity index 97% rename from application/shared-kernel/ApiCore/SinglePageApp/SinglePageAppFallbackExtensions.cs rename to application/shared-kernel/SharedKernel/SinglePageApp/SinglePageAppFallbackExtensions.cs index 85389730c..98c7f24be 100644 --- a/application/shared-kernel/ApiCore/SinglePageApp/SinglePageAppFallbackExtensions.cs +++ b/application/shared-kernel/SharedKernel/SinglePageApp/SinglePageAppFallbackExtensions.cs @@ -10,9 +10,9 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Microsoft.Extensions.Primitives; -using PlatformPlatform.SharedKernel.ApplicationCore.Authentication; +using PlatformPlatform.SharedKernel.Authentication; -namespace PlatformPlatform.SharedKernel.ApiCore.SinglePageApp; +namespace PlatformPlatform.SharedKernel.SinglePageApp; public static class SinglePageAppFallbackExtensions { diff --git a/application/shared-kernel/ApplicationCore/TelemetryEvents/TelemetryEventsCollector.cs b/application/shared-kernel/SharedKernel/TelemetryEvents/TelemetryEventsCollector.cs similarity index 91% rename from application/shared-kernel/ApplicationCore/TelemetryEvents/TelemetryEventsCollector.cs rename to application/shared-kernel/SharedKernel/TelemetryEvents/TelemetryEventsCollector.cs index 0d9a6cb7f..3f7df3c43 100644 --- a/application/shared-kernel/ApplicationCore/TelemetryEvents/TelemetryEventsCollector.cs +++ b/application/shared-kernel/SharedKernel/TelemetryEvents/TelemetryEventsCollector.cs @@ -1,4 +1,4 @@ -namespace PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +namespace PlatformPlatform.SharedKernel.TelemetryEvents; public interface ITelemetryEventsCollector { diff --git a/application/shared-kernel/SharedKernel/Validation/ErrorDetail.cs b/application/shared-kernel/SharedKernel/Validation/ErrorDetail.cs new file mode 100644 index 000000000..e7f26d4de --- /dev/null +++ b/application/shared-kernel/SharedKernel/Validation/ErrorDetail.cs @@ -0,0 +1,3 @@ +namespace PlatformPlatform.SharedKernel.Validation; + +public sealed record ErrorDetail(string? Code, string Message); diff --git a/application/shared-kernel/SharedKernel/Validation/ErrorMessage.cs b/application/shared-kernel/SharedKernel/Validation/ErrorMessage.cs new file mode 100644 index 000000000..ac01b85cc --- /dev/null +++ b/application/shared-kernel/SharedKernel/Validation/ErrorMessage.cs @@ -0,0 +1,3 @@ +namespace PlatformPlatform.SharedKernel.Validation; + +public sealed record ErrorMessage(string Message); diff --git a/application/shared-kernel/ApplicationCore/Validation/SharedValidations.cs b/application/shared-kernel/SharedKernel/Validation/SharedValidations.cs similarity index 95% rename from application/shared-kernel/ApplicationCore/Validation/SharedValidations.cs rename to application/shared-kernel/SharedKernel/Validation/SharedValidations.cs index cd793352f..e733cd335 100644 --- a/application/shared-kernel/ApplicationCore/Validation/SharedValidations.cs +++ b/application/shared-kernel/SharedKernel/Validation/SharedValidations.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace PlatformPlatform.SharedKernel.ApplicationCore.Validation; +namespace PlatformPlatform.SharedKernel.Validation; public static class SharedValidations { diff --git a/application/shared-kernel/Tests/ApplicationCore/Behaviors/PublishDomainEventsPipelineBehaviorTests.cs b/application/shared-kernel/Tests/ApplicationCore/Behaviors/PublishDomainEventsPipelineBehaviorTests.cs index 758070128..2cf7644e7 100644 --- a/application/shared-kernel/Tests/ApplicationCore/Behaviors/PublishDomainEventsPipelineBehaviorTests.cs +++ b/application/shared-kernel/Tests/ApplicationCore/Behaviors/PublishDomainEventsPipelineBehaviorTests.cs @@ -1,8 +1,8 @@ using FluentAssertions; using NSubstitute; -using PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.DomainCore.DomainEvents; +using PlatformPlatform.SharedKernel.Behaviors; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.DomainEvents; using PlatformPlatform.SharedKernel.Tests.TestEntities; using Xunit; diff --git a/application/shared-kernel/Tests/ApplicationCore/Behaviors/UnitOfWorkPipelineBehaviorTests.cs b/application/shared-kernel/Tests/ApplicationCore/Behaviors/UnitOfWorkPipelineBehaviorTests.cs index ec4ccaec0..16e6a8053 100644 --- a/application/shared-kernel/Tests/ApplicationCore/Behaviors/UnitOfWorkPipelineBehaviorTests.cs +++ b/application/shared-kernel/Tests/ApplicationCore/Behaviors/UnitOfWorkPipelineBehaviorTests.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; using NSubstitute; -using PlatformPlatform.SharedKernel.ApplicationCore.Behaviors; -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; -using PlatformPlatform.SharedKernel.DomainCore.Persistence; +using PlatformPlatform.SharedKernel.Behaviors; +using PlatformPlatform.SharedKernel.Cqrs; +using PlatformPlatform.SharedKernel.Persistence; using PlatformPlatform.SharedKernel.Tests.TestEntities; using Xunit; diff --git a/application/shared-kernel/Tests/ApplicationCore/TelemetryEvents/TelemetryEventsCollectorSpy.cs b/application/shared-kernel/Tests/ApplicationCore/TelemetryEvents/TelemetryEventsCollectorSpy.cs index ea2f76669..f1b57e138 100644 --- a/application/shared-kernel/Tests/ApplicationCore/TelemetryEvents/TelemetryEventsCollectorSpy.cs +++ b/application/shared-kernel/Tests/ApplicationCore/TelemetryEvents/TelemetryEventsCollectorSpy.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.ApplicationCore.TelemetryEvents; +using PlatformPlatform.SharedKernel.TelemetryEvents; namespace PlatformPlatform.SharedKernel.Tests.ApplicationCore.TelemetryEvents; diff --git a/application/shared-kernel/Tests/DomainCore/Entities/EntityEqualityComparerTests.cs b/application/shared-kernel/Tests/DomainCore/Entities/EntityEqualityComparerTests.cs index 069bd04cc..3d20fa6fd 100644 --- a/application/shared-kernel/Tests/DomainCore/Entities/EntityEqualityComparerTests.cs +++ b/application/shared-kernel/Tests/DomainCore/Entities/EntityEqualityComparerTests.cs @@ -1,5 +1,5 @@ using FluentAssertions; -using PlatformPlatform.SharedKernel.DomainCore.Entities; +using PlatformPlatform.SharedKernel.Entities; using Xunit; namespace PlatformPlatform.SharedKernel.Tests.DomainCore.Entities; diff --git a/application/shared-kernel/Tests/DomainCore/Entities/EntityTests.cs b/application/shared-kernel/Tests/DomainCore/Entities/EntityTests.cs index 6a0b1d7e5..95d3b7dc7 100644 --- a/application/shared-kernel/Tests/DomainCore/Entities/EntityTests.cs +++ b/application/shared-kernel/Tests/DomainCore/Entities/EntityTests.cs @@ -1,6 +1,6 @@ using FluentAssertions; -using PlatformPlatform.SharedKernel.DomainCore.Entities; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Entities; +using PlatformPlatform.SharedKernel.Identity; using Xunit; namespace PlatformPlatform.SharedKernel.Tests.DomainCore.Entities; diff --git a/application/shared-kernel/Tests/DomainCore/Identity/IdGeneratorTests.cs b/application/shared-kernel/Tests/DomainCore/Identity/IdGeneratorTests.cs index 9923d4396..48e08b74b 100644 --- a/application/shared-kernel/Tests/DomainCore/Identity/IdGeneratorTests.cs +++ b/application/shared-kernel/Tests/DomainCore/Identity/IdGeneratorTests.cs @@ -1,5 +1,5 @@ using FluentAssertions; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; using Xunit; namespace PlatformPlatform.SharedKernel.Tests.DomainCore.Identity; diff --git a/application/shared-kernel/Tests/DomainCore/Identity/StronglyTypedUlidTests.cs b/application/shared-kernel/Tests/DomainCore/Identity/StronglyTypedUlidTests.cs index 0c46dacaf..7579ae67c 100644 --- a/application/shared-kernel/Tests/DomainCore/Identity/StronglyTypedUlidTests.cs +++ b/application/shared-kernel/Tests/DomainCore/Identity/StronglyTypedUlidTests.cs @@ -1,5 +1,5 @@ using FluentAssertions; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; using Xunit; namespace PlatformPlatform.SharedKernel.Tests.DomainCore.Identity; diff --git a/application/shared-kernel/Tests/InfrastructureCore/Persistence/RepositoryTests.cs b/application/shared-kernel/Tests/InfrastructureCore/Persistence/RepositoryTests.cs index 1cde785cc..a2b859bbd 100644 --- a/application/shared-kernel/Tests/InfrastructureCore/Persistence/RepositoryTests.cs +++ b/application/shared-kernel/Tests/InfrastructureCore/Persistence/RepositoryTests.cs @@ -1,6 +1,6 @@ using FluentAssertions; using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Identity; using PlatformPlatform.SharedKernel.Tests.TestEntities; using Xunit; diff --git a/application/shared-kernel/Tests/InfrastructureCore/Persistence/UnitOfWorkTests.cs b/application/shared-kernel/Tests/InfrastructureCore/Persistence/UnitOfWorkTests.cs index 91b284922..b22817b68 100644 --- a/application/shared-kernel/Tests/InfrastructureCore/Persistence/UnitOfWorkTests.cs +++ b/application/shared-kernel/Tests/InfrastructureCore/Persistence/UnitOfWorkTests.cs @@ -1,6 +1,6 @@ using FluentAssertions; using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +using PlatformPlatform.SharedKernel.Persistence; using PlatformPlatform.SharedKernel.Tests.TestEntities; using Xunit; diff --git a/application/shared-kernel/Tests/SharedKernel.Tests.csproj b/application/shared-kernel/Tests/SharedKernel.Tests.csproj index 04bcf7018..d86e72d23 100644 --- a/application/shared-kernel/Tests/SharedKernel.Tests.csproj +++ b/application/shared-kernel/Tests/SharedKernel.Tests.csproj @@ -12,9 +12,7 @@ - - - + diff --git a/application/shared-kernel/Tests/TestEntities/TestAggregate.cs b/application/shared-kernel/Tests/TestEntities/TestAggregate.cs index 9240800cd..b0761c96e 100644 --- a/application/shared-kernel/Tests/TestEntities/TestAggregate.cs +++ b/application/shared-kernel/Tests/TestEntities/TestAggregate.cs @@ -1,5 +1,5 @@ -using PlatformPlatform.SharedKernel.DomainCore.Entities; -using PlatformPlatform.SharedKernel.DomainCore.Identity; +using PlatformPlatform.SharedKernel.Entities; +using PlatformPlatform.SharedKernel.Identity; namespace PlatformPlatform.SharedKernel.Tests.TestEntities; diff --git a/application/shared-kernel/Tests/TestEntities/TestAggregateCreatedEvent.cs b/application/shared-kernel/Tests/TestEntities/TestAggregateCreatedEvent.cs index ebf74ca41..643d8a718 100644 --- a/application/shared-kernel/Tests/TestEntities/TestAggregateCreatedEvent.cs +++ b/application/shared-kernel/Tests/TestEntities/TestAggregateCreatedEvent.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.DomainCore.DomainEvents; +using PlatformPlatform.SharedKernel.DomainEvents; namespace PlatformPlatform.SharedKernel.Tests.TestEntities; diff --git a/application/shared-kernel/Tests/TestEntities/TestAggregateRepository.cs b/application/shared-kernel/Tests/TestEntities/TestAggregateRepository.cs index 837c1de2b..dd5ba0dcf 100644 --- a/application/shared-kernel/Tests/TestEntities/TestAggregateRepository.cs +++ b/application/shared-kernel/Tests/TestEntities/TestAggregateRepository.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.InfrastructureCore.Persistence; +using PlatformPlatform.SharedKernel.Persistence; namespace PlatformPlatform.SharedKernel.Tests.TestEntities; diff --git a/application/shared-kernel/Tests/TestEntities/TestCommand.cs b/application/shared-kernel/Tests/TestEntities/TestCommand.cs index a95eab6b3..e15a7d1dd 100644 --- a/application/shared-kernel/Tests/TestEntities/TestCommand.cs +++ b/application/shared-kernel/Tests/TestEntities/TestCommand.cs @@ -1,4 +1,4 @@ -using PlatformPlatform.SharedKernel.ApplicationCore.Cqrs; +using PlatformPlatform.SharedKernel.Cqrs; namespace PlatformPlatform.SharedKernel.Tests.TestEntities; diff --git a/application/shared-kernel/Tests/TestEntities/TestDbContext.cs b/application/shared-kernel/Tests/TestEntities/TestDbContext.cs index 330887fcb..3c83cbcb8 100644 --- a/application/shared-kernel/Tests/TestEntities/TestDbContext.cs +++ b/application/shared-kernel/Tests/TestEntities/TestDbContext.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore; -using PlatformPlatform.SharedKernel.InfrastructureCore.EntityFramework; +using PlatformPlatform.SharedKernel.EntityFramework; namespace PlatformPlatform.SharedKernel.Tests.TestEntities;