From a0a53679d003f5703eb2a942d55390534b8d3282 Mon Sep 17 00:00:00 2001 From: DavidEggenberger Date: Mon, 22 Apr 2024 20:32:57 +0200 Subject: [PATCH] rename CQRS to Messaging --- .../Commands/AddMessageToChannel.cs | 2 +- .../Application/Commands/ChangeChannelName.cs | 2 +- .../Application/Commands/CreateChannel.cs | 2 +- .../Application/Commands/DeleteChannel.cs | 2 +- .../Commands/DeleteMessageFromChannel.cs | 2 +- .../ChannelMessagesUpdatedEventHandler.cs | 2 +- .../Application/Queries/GetAllChannels.cs | 2 +- .../Queries/GetAllMessagesForChannel.cs | 2 +- .../Application/Queries/GetChannelById.cs | 2 +- .../Application/Queries/GetMessageById.cs | 2 +- .../Components/ChannelComponent.razor.cs | 4 +- .../Client/Modals/CreateChannelModal.razor.cs | 4 +- .../Server/Controllers/ChannelsController.cs | 4 +- .../UserUpdatedIntegrationEventHandler.cs | 2 +- .../Aplication/Queries/GetStripeCustomer.cs | 2 +- .../Commands/CreateSubscriptionForTenant.cs | 2 +- .../Commands/DeleteSubscription.cs | 2 +- .../Commands/UpdateSubscription.cs | 2 +- .../Queries/GetStripeCheckoutSession.cs | 2 +- .../Controllers/StripeSuccessController.cs | 2 +- .../Web/Server/Controllers/StripeWebhook.cs | 4 +- .../Queries/GetAllTenantMembershipsOfUser.cs | 2 +- .../Application/Queries/GetTenantById.cs | 2 +- .../Queries/GetTenantMembershipQuery.cs | 2 +- .../Application/Commands/CreateNewUser.cs | 2 +- .../Commands/SetSelectedTenantForUser.cs | 2 +- .../Application/Commands/UpdateUser.cs | 2 +- .../Application/Queries/GetClaimsForUser.cs | 2 +- .../Application/Queries/GetUserById.cs | 2 +- .../UserClaimsPrincipalFactory.cs | 2 +- .../Components/CreateTenantComponent.razor.cs | 7 ++- .../Modals/ChangeRoleOfMemberComp.razor.cs | 2 +- .../Members/Modals/InviteMemberComp.razor.cs | 4 +- .../Members/Modals/RemoveMemberComp.razor.cs | 2 +- .../Members/Modals/RevokeInvitationComp.razor | 2 +- .../Modals/RevokeInvitationComp.razor.cs | 4 +- .../ManageSubscriptionComponent.razor.cs | 2 +- .../ExternalLoginCallbackController.cs | 2 +- .../Server/Controllers/IdentityController.cs | 4 +- .../Web/Server/Pages/Account/Email.cshtml | 2 +- .../Web/Server/Pages/Account/Email.cshtml.cs | 2 +- .../Pages/Account/ExternalLogins.cshtml | 2 +- .../Pages/Account/ExternalLogins.cshtml.cs | 2 +- .../Web/Server/Pages/Account/Index.cshtml | 2 +- .../Web/Server/Pages/Account/Index.cshtml.cs | 2 +- .../Server/Pages/Account/PersonalData.cshtml | 2 +- .../Pages/Account/PersonalData.cshtml.cs | 2 +- .../Pages/Account/Shared/ManageNavPages.cs | 2 +- .../Account/TwoFactorAuthentication.cshtml | 2 +- .../Account/TwoFactorAuthentication.cshtml.cs | 2 +- .../Server/Pages/Account/_ViewImports.cshtml | 2 +- .../Web/Server/Pages/Login.cshtml | 6 +-- .../Web/Server/Pages/Login.cshtml.cs | 2 +- .../Web/Server/Pages/LoginWith2FA.cshtml | 2 +- .../Web/Server/Pages/LoginWith2FA.cshtml.cs | 2 +- .../Server/Pages/LoginWithRecoveryCode.cshtml | 2 +- .../Pages/LoginWithRecoveryCode.cshtml.cs | 2 +- .../Pages/Shared/_LogInSignUpSwitch.cshtml | 2 +- .../Pages/Shared/_LogInSignUpSwitch.cshtml.cs | 2 +- .../Web/Server/Pages/SignUp.cshtml | 2 +- .../Web/Server/Pages/SignUp.cshtml.cs | 2 +- .../Web/Server/Pages/Stripe/Cancel.cshtml | 2 +- .../Web/Server/Pages/Stripe/Cancel.cshtml.cs | 2 +- .../Web/Server/Pages/Stripe/Success.cshtml | 2 +- .../Web/Server/Pages/Stripe/Success.cshtml.cs | 2 +- .../TeamManagement/SubscriptionPlan.cshtml | 2 +- .../TeamManagement/SubscriptionPlan.cshtml.cs | 2 +- .../Web/Server/SignalR/NotificationHub.cs | 4 +- .../Web/Server/TenantIdentityModuleStartup.cs | 4 +- Source/Shared/Client/BaseComponent.razor.cs | 6 +-- .../Components/Modals/DefaultModalOptions.cs | 21 +++++++++ .../Modals/DeletionReassuranceModal.razor | 1 + .../Shared/Features/CQRS/Command/ICommand.cs | 6 --- .../Shared/Features/EFCore/BaseDbContext.cs | 2 +- .../Command/CommandDispatcher.cs | 2 +- .../Features/Messaging/Command/ICommand.cs | 6 +++ .../Command/ICommandDispatcher.cs | 2 +- .../Command/ICommandHandler.cs | 2 +- .../DomainEvent/DomainEventDispatcher.cs | 2 +- .../DomainEvent/IDomainEventDispatcher.cs | 2 +- .../DomainEvent/IDomainEventHandler.cs | 2 +- .../IIntegrationEventDispatcher.cs | 2 +- .../IIntegrationEventHandler.cs | 2 +- .../IntegrationEventDispatcher.cs | 2 +- .../Query/BaseQueryHandler.cs | 2 +- .../{CQRS => Messaging}/Query/IQuery.cs | 2 +- .../Query/IQueryDispatcher.cs | 2 +- .../Query/IQueryHandler.cs | 2 +- .../Query/QueryDispatcher.cs | 2 +- .../{CQRS => Messaging}/Registrator.cs | 30 ++++++++++--- Source/Shared/Features/Modules/IModule.cs | 9 ++++ .../Shared/Features/Modules/IModuleStartup.cs | 4 +- Source/Shared/Features/Modules/Registrator.cs | 43 +++++++++++-------- .../Shared/Features/Server/BaseController.cs | 4 +- .../Features/Server/ServerExecutionBase.cs | 8 ++-- Source/Web/Client/App.razor | 20 ++++----- .../Antiforgery/AntiforgeryTokenService.cs | 2 +- .../BuildingBlocks/Auth/AuthorizedHandler.cs | 4 +- .../Auth/HostAuthenticationStateProvider.cs | 4 +- .../Layouts/BaseLayout.razor.cs | 2 +- .../Layouts/MainLayout.razor.cs | 2 +- .../MainLayoutMenu/TeamsOverviewComp.razor.cs | 4 +- .../Wrappers/ExceptionHandlingWrapper.razor | 2 +- .../Client/Components/CustomErrorBoundary.cs | 2 +- .../Components/Diagrams/Nodes/UserNode.cs | 4 +- .../Components/Diagrams/Ports/NodePort.cs | 2 +- Source/Web/Client/IAssemblyMarker.cs | 2 +- Source/Web/Client/Pages/Channels.razor | 4 +- Source/Web/Client/Pages/Channels.razor.cs | 10 ++--- Source/Web/Client/Pages/Dashboard.razor.cs | 2 +- Source/Web/Client/Pages/ManageTeam.razor | 8 ++-- Source/Web/Client/Pages/ManageTeam.razor.cs | 6 +-- Source/Web/Client/Pages/Topic.razor | 1 + Source/Web/Client/Pages/Topic.razor.cs | 6 +-- Source/Web/Client/Program.cs | 15 +++---- .../Web/Client/Properties/launchSettings.json | 2 +- Source/Web/Client/_Imports.razor | 3 +- .../AntiforgeryToken/Registrator.cs | 2 +- .../Web/Server/BuildingBlocks/Registrator.cs | 2 +- Source/Web/Server/Dockerfile | 22 +++++----- Source/Web/Server/Dockerfile.original | 14 +++--- Source/Web/Server/Pages/Error.cshtml | 2 +- Source/Web/Server/Pages/Error.cshtml.cs | 2 +- Source/Web/Server/Pages/Shared/_Layout.cshtml | 2 +- Source/Web/Server/Pages/_Host.cshtml | 2 +- Source/Web/Server/Pages/_ViewImports.cshtml | 2 +- Source/Web/Server/Program.cs | 4 +- .../Web/Server/Properties/launchSettings.json | 2 +- Source/Web/Server/Startup.cs | 2 +- Source/Web/Server/wwwroot/js/site.js | 2 +- 130 files changed, 273 insertions(+), 227 deletions(-) create mode 100644 Source/Shared/Client/Components/Modals/DefaultModalOptions.cs create mode 100644 Source/Shared/Client/Components/Modals/DeletionReassuranceModal.razor delete mode 100644 Source/Shared/Features/CQRS/Command/ICommand.cs rename Source/Shared/Features/{CQRS => Messaging}/Command/CommandDispatcher.cs (95%) create mode 100644 Source/Shared/Features/Messaging/Command/ICommand.cs rename Source/Shared/Features/{CQRS => Messaging}/Command/ICommandDispatcher.cs (87%) rename Source/Shared/Features/{CQRS => Messaging}/Command/ICommandHandler.cs (88%) rename Source/Shared/Features/{CQRS => Messaging}/DomainEvent/DomainEventDispatcher.cs (94%) rename Source/Shared/Features/{CQRS => Messaging}/DomainEvent/IDomainEventDispatcher.cs (82%) rename Source/Shared/Features/{CQRS => Messaging}/DomainEvent/IDomainEventHandler.cs (82%) rename Source/Shared/Features/{CQRS => Messaging}/IntegrationEvent/IIntegrationEventDispatcher.cs (89%) rename Source/Shared/Features/{CQRS => Messaging}/IntegrationEvent/IIntegrationEventHandler.cs (83%) rename Source/Shared/Features/{CQRS => Messaging}/IntegrationEvent/IntegrationEventDispatcher.cs (94%) rename Source/Shared/Features/{CQRS => Messaging}/Query/BaseQueryHandler.cs (87%) rename Source/Shared/Features/{CQRS => Messaging}/Query/IQuery.cs (55%) rename Source/Shared/Features/{CQRS => Messaging}/Query/IQueryDispatcher.cs (82%) rename Source/Shared/Features/{CQRS => Messaging}/Query/IQueryHandler.cs (81%) rename Source/Shared/Features/{CQRS => Messaging}/Query/QueryDispatcher.cs (94%) rename Source/Shared/Features/{CQRS => Messaging}/Registrator.cs (72%) create mode 100644 Source/Shared/Features/Modules/IModule.cs diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/AddMessageToChannel.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/AddMessageToChannel.cs index 027f4dcd..4fe5ce5d 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/AddMessageToChannel.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/AddMessageToChannel.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/ChangeChannelName.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/ChangeChannelName.cs index 9b4f90fe..3c87afca 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/ChangeChannelName.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/ChangeChannelName.cs @@ -1,5 +1,5 @@ using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/CreateChannel.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/CreateChannel.cs index 7b9dbbd0..4b1a67ef 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/CreateChannel.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/CreateChannel.cs @@ -1,5 +1,5 @@ using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteChannel.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteChannel.cs index 3bc8fa3a..0e8df7a3 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteChannel.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteChannel.cs @@ -1,5 +1,5 @@ using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteMessageFromChannel.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteMessageFromChannel.cs index 1108bfa8..46894aef 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteMessageFromChannel.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Commands/DeleteMessageFromChannel.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/EventHandlers/ChannelMessagesUpdatedEventHandler.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/EventHandlers/ChannelMessagesUpdatedEventHandler.cs index 1a011e58..e871e27e 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/EventHandlers/ChannelMessagesUpdatedEventHandler.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/EventHandlers/ChannelMessagesUpdatedEventHandler.cs @@ -1,5 +1,5 @@ using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Events; -using Shared.Features.CQRS.DomainEvent; +using Shared.Features.Messaging.DomainEvent; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.EventHandlers { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllChannels.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllChannels.cs index 27c44608..b061dc40 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllChannels.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllChannels.cs @@ -1,5 +1,5 @@ using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllMessagesForChannel.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllMessagesForChannel.cs index d76a4858..4771ceb7 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllMessagesForChannel.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetAllMessagesForChannel.cs @@ -1,5 +1,5 @@ using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetChannelById.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetChannelById.cs index f4bb17b5..47cc1e1c 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetChannelById.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetChannelById.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; using Modules.Channels.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries { diff --git a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetMessageById.cs b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetMessageById.cs index 40823a2c..85966e79 100644 --- a/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetMessageById.cs +++ b/Source/Modules/Channels/Features/DomainFeatures/ChannelAggregate/Application/Queries/GetMessageById.cs @@ -1,4 +1,4 @@ -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; namespace Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries { diff --git a/Source/Modules/Channels/Web/Client/Components/ChannelComponent.razor.cs b/Source/Modules/Channels/Web/Client/Components/ChannelComponent.razor.cs index cafafff8..23a975dd 100644 --- a/Source/Modules/Channels/Web/Client/Components/ChannelComponent.razor.cs +++ b/Source/Modules/Channels/Web/Client/Components/ChannelComponent.razor.cs @@ -13,7 +13,7 @@ protected override async Task OnInitializedAsync() //{ // if(Channel.Id == channelId) // { - // Channel = await HttpClientService.GetFromAPIAsync($"/channel/{Channel.Id}"); + // Channel = await HttpWeb.ClientService.GetFromAPIAsync($"/channel/{Channel.Id}"); // StateHasChanged(); // } //}); @@ -21,7 +21,7 @@ protected override async Task OnInitializedAsync() protected async Task DeleteChannel() { - //await HttpClientService.DeleteFromAPIAsync("/channel", Channel.Id); + //await HttpWeb.ClientService.DeleteFromAPIAsync("/channel", Channel.Id); } } } diff --git a/Source/Modules/Channels/Web/Client/Modals/CreateChannelModal.razor.cs b/Source/Modules/Channels/Web/Client/Modals/CreateChannelModal.razor.cs index 9f8e32fa..ca0698ed 100644 --- a/Source/Modules/Channels/Web/Client/Modals/CreateChannelModal.razor.cs +++ b/Source/Modules/Channels/Web/Client/Modals/CreateChannelModal.razor.cs @@ -5,7 +5,7 @@ using Shared.Client; using Shared.Kernel.BuildingBlocks.Services.Http; -namespace Modules.Channels.Web.Client.Modals +namespace Modules.Channels.Web.Web.Client.Modals { //public partial class CreateChannelModal : BaseComponent //{ @@ -24,7 +24,7 @@ namespace Modules.Channels.Web.Client.Modals // } // private async Task CreateChannelAsync() // { - // //await HttpClientService.PostToAPIAsync("/channel", new ChannelDTO { Name = currentName }); + // //await HttpWeb.ClientService.PostToAPIAsync("/channel", new ChannelDTO { Name = currentName }); // await ModalInstance.CancelAsync(); // } //} diff --git a/Source/Modules/Channels/Web/Server/Controllers/ChannelsController.cs b/Source/Modules/Channels/Web/Server/Controllers/ChannelsController.cs index d8215f05..9978ae7d 100644 --- a/Source/Modules/Channels/Web/Server/Controllers/ChannelsController.cs +++ b/Source/Modules/Channels/Web/Server/Controllers/ChannelsController.cs @@ -2,8 +2,8 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using AutoMapper; -using Shared.Features.CQRS.Query; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Query; +using Shared.Features.Messaging.Command; using Modules.Channels.Features.DomainFeatures.ChannelAggregate; using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Commands; using Modules.Channels.Features.DomainFeatures.ChannelAggregate.Application.Queries; diff --git a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/IntegrationEventHandlers/UserUpdatedIntegrationEventHandler.cs b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/IntegrationEventHandlers/UserUpdatedIntegrationEventHandler.cs index 08933a1d..ef98a5a1 100644 --- a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/IntegrationEventHandlers/UserUpdatedIntegrationEventHandler.cs +++ b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/IntegrationEventHandlers/UserUpdatedIntegrationEventHandler.cs @@ -1,5 +1,5 @@ using Modules.TenantIdentity.IntegrationEvents; -using Shared.Features.CQRS.IntegrationEvent; +using Shared.Features.Messaging.IntegrationEvent; namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate.Aplication.IntegrationEventHandlers { diff --git a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/Queries/GetStripeCustomer.cs b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/Queries/GetStripeCustomer.cs index 95ab0b89..a929bb91 100644 --- a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/Queries/GetStripeCustomer.cs +++ b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeCustomerAggregate/Aplication/Queries/GetStripeCustomer.cs @@ -1,5 +1,5 @@ using Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; namespace Modules.Subscriptions.Features.DomainFeatures.StripeCustomerAggregate.Aplication.Queries { diff --git a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/CreateSubscriptionForTenant.cs b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/CreateSubscriptionForTenant.cs index 8de7baff..1dfd2b46 100644 --- a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/CreateSubscriptionForTenant.cs +++ b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/CreateSubscriptionForTenant.cs @@ -1,4 +1,4 @@ -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Commands { diff --git a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/DeleteSubscription.cs b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/DeleteSubscription.cs index 22359440..2e8f71a3 100644 --- a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/DeleteSubscription.cs +++ b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/DeleteSubscription.cs @@ -1,4 +1,4 @@ -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Commands { diff --git a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/UpdateSubscription.cs b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/UpdateSubscription.cs index 1a831e3d..57f41150 100644 --- a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/UpdateSubscription.cs +++ b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Commands/UpdateSubscription.cs @@ -1,4 +1,4 @@ -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Commands { diff --git a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Queries/GetStripeCheckoutSession.cs b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Queries/GetStripeCheckoutSession.cs index 9c5f6ac9..6fccfc64 100644 --- a/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Queries/GetStripeCheckoutSession.cs +++ b/Source/Modules/Subscription/Features/Modules.Subscription.Features/DomainFeatures/StripeSubscriptionAggregate/Application/Queries/GetStripeCheckoutSession.cs @@ -1,4 +1,4 @@ -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; namespace Modules.Subscriptions.Features.DomainFeatures.StripeSubscriptionAggregate.Application.Queries { diff --git a/Source/Modules/Subscription/Web/Server/Controllers/StripeSuccessController.cs b/Source/Modules/Subscription/Web/Server/Controllers/StripeSuccessController.cs index be9b4212..1dc42d71 100644 --- a/Source/Modules/Subscription/Web/Server/Controllers/StripeSuccessController.cs +++ b/Source/Modules/Subscription/Web/Server/Controllers/StripeSuccessController.cs @@ -2,7 +2,7 @@ //using Microsoft.AspNetCore.Mvc; -//namespace WebServer.Controllers.Stripe +//namespace Web.Server.Controllers.Stripe //{ // [Route("api/[controller]")] // [ApiController] diff --git a/Source/Modules/Subscription/Web/Server/Controllers/StripeWebhook.cs b/Source/Modules/Subscription/Web/Server/Controllers/StripeWebhook.cs index bb7173ab..719eb25d 100644 --- a/Source/Modules/Subscription/Web/Server/Controllers/StripeWebhook.cs +++ b/Source/Modules/Subscription/Web/Server/Controllers/StripeWebhook.cs @@ -1,4 +1,4 @@ -//using Shared.Modules.Layers.Application.CQRS.Command; +//using Shared.Modules.Layers.Application.Messaging.Command; //using Shared.Modules.Layers.Features.StripeIntegration; //using Shared.Modules.Layers.Features.StripeIntegration.Commands; //using Shared.Modules.Layers.Features.StripeIntegration.Configuration; @@ -9,7 +9,7 @@ //using Stripe; //using System.IO; -//namespace WebServer.Controllers.Stripe +//namespace Web.Server.Controllers.Stripe //{ // [Route("api/[controller]")] // [ApiController] diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetAllTenantMembershipsOfUser.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetAllTenantMembershipsOfUser.cs index bcbe1142..63f0ecc5 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetAllTenantMembershipsOfUser.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetAllTenantMembershipsOfUser.cs @@ -1,5 +1,5 @@ using Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; using System; using System.Collections.Generic; diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantById.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantById.cs index 03257f60..3a8253d3 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantById.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantById.cs @@ -1,5 +1,5 @@ using Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; using System; namespace Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate.Application.Queries diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantMembershipQuery.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantMembershipQuery.cs index 8d6d46f5..f2d3ef73 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantMembershipQuery.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/TenantAggregate/Application/Queries/GetTenantMembershipQuery.cs @@ -1,6 +1,6 @@ using Modules.TenantIdentity.Features.DomainFeatures.TenantAggregate; using Modules.TenantIdentity.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; using System; using System.Linq; using System.Threading; diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/CreateNewUser.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/CreateNewUser.cs index 1405dc9e..b2e2110a 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/CreateNewUser.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/CreateNewUser.cs @@ -1,5 +1,5 @@ using Microsoft.AspNetCore.Identity; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; using System.Threading; using System.Threading.Tasks; diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/SetSelectedTenantForUser.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/SetSelectedTenantForUser.cs index 73ec2cb6..380388ee 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/SetSelectedTenantForUser.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/SetSelectedTenantForUser.cs @@ -1,5 +1,5 @@ using Modules.TenantIdentity.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; using System; using System.Threading; using System.Threading.Tasks; diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/UpdateUser.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/UpdateUser.cs index 0d4f2057..85e8ab76 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/UpdateUser.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Commands/UpdateUser.cs @@ -1,5 +1,5 @@ using Microsoft.AspNetCore.Http; -using Shared.Features.CQRS.Command; +using Shared.Features.Messaging.Command; namespace Modules.TenantIdentity.Features.DomainFeatures.UserAggregate.Application.Commands { diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetClaimsForUser.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetClaimsForUser.cs index 0b595cb1..1cf3608a 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetClaimsForUser.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetClaimsForUser.cs @@ -1,5 +1,5 @@ using Modules.TenantIdentity.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; using Shared.Kernel.BuildingBlocks.Auth.Constants; using System; using System.Collections.Generic; diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetUserById.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetUserById.cs index d816fe8a..10244d55 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetUserById.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/DomainFeatures/UserAggregate/Application/Queries/GetUserById.cs @@ -1,5 +1,5 @@ using Modules.TenantIdentity.Features.Infrastructure.EFCore; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; using System; using System.Threading; using System.Threading.Tasks; diff --git a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/Infrastructure/UserClaimsPrincipalFactory.cs b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/Infrastructure/UserClaimsPrincipalFactory.cs index b8735698..c65d0334 100644 --- a/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/Infrastructure/UserClaimsPrincipalFactory.cs +++ b/Source/Modules/TenantIdentity/Features/Modules.TenantIdentity.Features/Infrastructure/UserClaimsPrincipalFactory.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Identity; using System.Security.Claims; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate.Application.Queries; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; using System.Threading.Tasks; diff --git a/Source/Modules/TenantIdentity/Web/Client/Components/CreateTenantComponent.razor.cs b/Source/Modules/TenantIdentity/Web/Client/Components/CreateTenantComponent.razor.cs index 847df7e3..24cd9ed6 100644 --- a/Source/Modules/TenantIdentity/Web/Client/Components/CreateTenantComponent.razor.cs +++ b/Source/Modules/TenantIdentity/Web/Client/Components/CreateTenantComponent.razor.cs @@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Components; using Modules.IdentityModule.Web.DTOs; using Shared.Client; -using Shared.Kernel.BuildingBlocks.Services.ModelValidation; namespace Modules.TenantIdentity.Web.Client.Components { @@ -19,14 +18,14 @@ public string CurrentName set { currentName = value; - validationServiceResult = ValidationService.Validate(new TeamDTO { Name = currentName }); + validationServiceResult = validationService.Validate(new TeamDTO { Name = currentName }); } } private async Task CreateGroupAsync() { - await HttpClientService.PostToAPIAsync("/team", new TeamDTO { Name = currentName }); + await httpClientService.PostToAPIAsync("/team", new TeamDTO { Name = currentName }); await ModalInstance.CloseAsync(); - NavigationManager.NavigateTo("/", true); + navigationManager.NavigateTo("/", true); } } } diff --git a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/ChangeRoleOfMemberComp.razor.cs b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/ChangeRoleOfMemberComp.razor.cs index 1649a9af..55016b0a 100644 --- a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/ChangeRoleOfMemberComp.razor.cs +++ b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/ChangeRoleOfMemberComp.razor.cs @@ -1,4 +1,4 @@ -namespace Client.Components.ManageTeam.Members.Modals +namespace Web.Client.Components.ManageTeam.Members.Modals { public partial class ChangeRoleOfMemberComp { diff --git a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/InviteMemberComp.razor.cs b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/InviteMemberComp.razor.cs index ef0852bc..2eb8c14c 100644 --- a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/InviteMemberComp.razor.cs +++ b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/InviteMemberComp.razor.cs @@ -18,7 +18,7 @@ public string currentMail set { _currentMail = value; - valid = ValidationService.Validate(new InviteMembersDTO { Emails = new List { _currentMail } }).IsValid; + valid = validationService.Validate(new InviteMembersDTO { Emails = new List { _currentMail } }).IsValid; } } protected override async Task OnInitializedAsync() @@ -41,7 +41,7 @@ public async Task InviteUsersAsync() { Emails = emailAddresses }; - await HttpClientService.PostToAPIAsync("/teamadmin/invite", inviteUserToTeamDTO); + await httpClientService.PostToAPIAsync("/teamadmin/invite", inviteUserToTeamDTO); await ModalInstance.CloseAsync(); } } diff --git a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RemoveMemberComp.razor.cs b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RemoveMemberComp.razor.cs index b90a8607..67b6a51d 100644 --- a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RemoveMemberComp.razor.cs +++ b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RemoveMemberComp.razor.cs @@ -1,4 +1,4 @@ -namespace Client.Components.ManageTeam.Members.Modals +namespace Web.Client.Components.ManageTeam.Members.Modals { public partial class RemoveMemberComp { diff --git a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor index bdb15bfe..ce8911ca 100644 --- a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor +++ b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor @@ -1,4 +1,4 @@ -@using global::Client.Components.ManageTeam.Members.Modals +@using global::Web.Client.Components.ManageTeam.Members.Modals @inherits RevokeInvitationCompBase
diff --git a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor.cs b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor.cs index f02ca3a0..8adbf7f8 100644 --- a/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor.cs +++ b/Source/Modules/TenantIdentity/Web/Client/Components/Members/Modals/RevokeInvitationComp.razor.cs @@ -4,7 +4,7 @@ using Shared.Client; using WebShared.Identity.Team.AdminManagement; -namespace Client.Components.ManageTeam.Members.Modals +namespace Web.Client.Components.ManageTeam.Members.Modals { public partial class RevokeInvitationCompBase : BaseComponent { @@ -13,7 +13,7 @@ public partial class RevokeInvitationCompBase : BaseComponent [Parameter] public TeamAdminInfoDTO TeamAdminInfo { get; set; } public async Task RevokeInvitation() { - await HttpClientService.PostToAPIAsync("/teamAdmin/invite/revoke", new RevokeInvitationDTO { TeamId = TeamAdminInfo.Id, UserId = Member.Id }); + await httpClientService.PostToAPIAsync("/teamAdmin/invite/revoke", new RevokeInvitationDTO { TeamId = TeamAdminInfo.Id, UserId = Member.Id }); await CloseModal(); } public async Task CloseModal() diff --git a/Source/Modules/TenantIdentity/Web/Client/Components/Subscription/ManageSubscriptionComponent.razor.cs b/Source/Modules/TenantIdentity/Web/Client/Components/Subscription/ManageSubscriptionComponent.razor.cs index 53171850..2ca8b6d1 100644 --- a/Source/Modules/TenantIdentity/Web/Client/Components/Subscription/ManageSubscriptionComponent.razor.cs +++ b/Source/Modules/TenantIdentity/Web/Client/Components/Subscription/ManageSubscriptionComponent.razor.cs @@ -11,7 +11,7 @@ public partial class ManageSubscriptionComponentBase : BaseComponent protected List subscriptionPlans = new List(); protected override async Task OnInitializedAsync() { - subscriptionPlans = await HttpClientService.GetFromAPIAsync>("/subscriptionplan/all"); + subscriptionPlans = await httpClientService.GetFromAPIAsync>("/subscriptionplan/all"); } } } diff --git a/Source/Modules/TenantIdentity/Web/Server/Controllers/ExternalLoginCallbackController.cs b/Source/Modules/TenantIdentity/Web/Server/Controllers/ExternalLoginCallbackController.cs index 416a9582..31c1f25b 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Controllers/ExternalLoginCallbackController.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Controllers/ExternalLoginCallbackController.cs @@ -8,7 +8,7 @@ using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate.Application.Commands; using Shared.Features.Server; -namespace WebServer.Controllers.Identity +namespace Web.Server.Controllers.Identity { [Route("api/[controller]")] [AllowAnonymous] diff --git a/Source/Modules/TenantIdentity/Web/Server/Controllers/IdentityController.cs b/Source/Modules/TenantIdentity/Web/Server/Controllers/IdentityController.cs index b091a9be..c8e2668e 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Controllers/IdentityController.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Controllers/IdentityController.cs @@ -1,5 +1,5 @@ //using AutoMapper; -//using Shared.Features.CQRS.Query; +//using Shared.Features.Messaging.Query; //using Shared.Modules.Layers.Features.Identity; //using Microsoft.AspNetCore.Authorization; //using Microsoft.AspNetCore.Identity; @@ -8,7 +8,7 @@ //using Modules.IdentityModule.Web.DTOs; //using ApplicationUserManager = Shared.Modules.Layers.Features.Identity.ApplicationUserManager; -//namespace WebServer.Controllers.Identity +//namespace Web.Server.Controllers.Identity //{ // [Route("api/[controller]")] // [Authorize] diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml index 421eaaa3..72564ddb 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml @@ -1,4 +1,4 @@ @page -@model WebServer.Pages.Identity.Account.EmailModel +@model Web.Server.Pages.Identity.Account.EmailModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml.cs index ebeab3c7..b7e70a54 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Email.cshtml.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace WebServer.Pages.Identity.Account +namespace Web.Server.Pages.Identity.Account { public class EmailModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml index 490dc347..c73e4ad2 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml @@ -1,4 +1,4 @@ @page -@model WebServer.Pages.Identity.Account.ExternalLoginsModel +@model Web.Server.Pages.Identity.Account.ExternalLoginsModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml.cs index 6a5327c5..4d68ee23 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/ExternalLogins.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; -namespace WebServer.Pages.Identity.Account +namespace Web.Server.Pages.Identity.Account { public class ExternalLoginsModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml index 313d7734..3bfa1802 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml @@ -1,5 +1,5 @@ @page -@model WebServer.Pages.Identity.Account.IndexModel +@model Web.Server.Pages.Identity.Account.IndexModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml.cs index 863e9551..fac6d8c1 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Index.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; -namespace WebServer.Pages.Identity.Account +namespace Web.Server.Pages.Identity.Account { public class IndexModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml index 632b3657..c3ddc488 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml @@ -1,5 +1,5 @@ @page -@model WebServer.Pages.Identity.Account.PersonalDataModel +@model Web.Server.Pages.Identity.Account.PersonalDataModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml.cs index 7eeffe40..e3ca0255 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/PersonalData.cshtml.cs @@ -4,7 +4,7 @@ using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; using System.Text.Json; -namespace WebServer.Pages.Identity.Account +namespace Web.Server.Pages.Identity.Account { public class PersonalDataModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Shared/ManageNavPages.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Shared/ManageNavPages.cs index 67247158..1d63160e 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Shared/ManageNavPages.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/Shared/ManageNavPages.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc.Rendering; -namespace WebServer.Pages.Identity.Account.Shared +namespace Web.Server.Pages.Identity.Account.Shared { public static class ManageNavPages { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml index ac8e8625..7a0ec307 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml @@ -1,4 +1,4 @@ @page -@model WebServer.Pages.Identity.Account.TwoFactorAuthenticationModel +@model Web.Server.Pages.Identity.Account.TwoFactorAuthenticationModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml.cs index 1fdd8037..dcdca99e 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/TwoFactorAuthentication.cshtml.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; -namespace WebServer.Pages.Identity.Account +namespace Web.Server.Pages.Identity.Account { public class TwoFactorAuthenticationModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/_ViewImports.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/_ViewImports.cshtml index 6e6c6cdf..0ead7299 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Account/_ViewImports.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Account/_ViewImports.cshtml @@ -1,2 +1,2 @@ -@using WebServer.Pages.Identity.Account.Shared +@using Web.Server.Pages.Identity.Account.Shared @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml index 58747bb6..fcbf2fb2 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml @@ -1,7 +1,7 @@ @page -@using WebServer.Pages.Identity -@using WebServer.Pages.Identity.Shared -@model WebServer.Pages.Identity.LoginModel +@using Web.Server.Pages.Identity +@using Web.Server.Pages.Identity.Shared +@model Web.Server.Pages.Identity.LoginModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml.cs index 7d237de3..fb52ca56 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Login.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; -namespace WebServer.Pages.Identity +namespace Web.Server.Pages.Identity { public class LoginModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml index 026aabf0..4487a3df 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml @@ -1,5 +1,5 @@ @*@page -@model WebServer.Pages.Identity.LoginWith2FAModel +@model Web.Server.Pages.Identity.LoginWith2FAModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml.cs index a4e92a90..a68561da 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWith2FA.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; -namespace WebServer.Pages.Identity +namespace Web.Server.Pages.Identity { [AllowAnonymous] public class LoginWith2FAModel : PageModel diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml index 0e9fdcce..151dec01 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml @@ -1,5 +1,5 @@ @*@page -@model WebServer.Pages.Identity.LoginWithRecoveryCodeModel +@model Web.Server.Pages.Identity.LoginWithRecoveryCodeModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml.cs index 539d00fa..a0d23b08 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/LoginWithRecoveryCode.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; -namespace WebServer.Pages.Identity +namespace Web.Server.Pages.Identity { [AllowAnonymous] public class LoginWithRecoveryCodeModel : PageModel diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml index 0471c5b3..58b9c416 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml @@ -1,4 +1,4 @@ -@model WebServer.Pages.Identity.Shared._LogInSignUpSwitchModel +@model Web.Server.Pages.Identity.Shared._LogInSignUpSwitchModel
diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml.cs index 0b0a35f4..9ad7bf1c 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Shared/_LogInSignUpSwitch.cshtml.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace WebServer.Pages.Identity.Shared +namespace Web.Server.Pages.Identity.Shared { public class _LogInSignUpSwitchModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml index 1b58277f..7558b2a8 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml @@ -1,5 +1,5 @@ @*@page -@model WebServer.Pages.Identity.SignUpModel +@model Web.Server.Pages.Identity.SignUpModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml.cs index e0a6164a..3c7a62aa 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/SignUp.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Mvc.RazorPages; using Modules.TenantIdentity.Features.DomainFeatures.UserAggregate; -namespace WebServer.Pages.Identity +namespace Web.Server.Pages.Identity { public class SignUpModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml index e20d9727..00b80067 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml @@ -1,5 +1,5 @@ @page -@model WebServer.Pages.Identity.Stripe.CancelModel +@model Web.Server.Pages.Identity.Stripe.CancelModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml.cs index 87c909b5..f0de0b24 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Cancel.cshtml.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace WebServer.Pages.Identity.Stripe +namespace Web.Server.Pages.Identity.Stripe { public class CancelModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml index 2646e64b..979e0065 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml @@ -1,5 +1,5 @@ @page -@model WebServer.Pages.Identity.Stripe.SuccessModel +@model Web.Server.Pages.Identity.Stripe.SuccessModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml.cs index 036d2a7e..8b2bb058 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/Stripe/Success.cshtml.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Mvc.RazorPages; -namespace WebServer.Pages.Identity.Stripe +namespace Web.Server.Pages.Identity.Stripe { public class SuccessModel : PageModel { diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml b/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml index 7e32f07a..621167a1 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml @@ -1,5 +1,5 @@ @*@page -@model WebServer.Pages.Identity.TeamManagement.ManagePlanModel +@model Web.Server.Pages.Identity.TeamManagement.ManagePlanModel @{ } diff --git a/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml.cs b/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml.cs index 1e7c5d83..93cc52d2 100644 --- a/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml.cs +++ b/Source/Modules/TenantIdentity/Web/Server/Pages/TeamManagement/SubscriptionPlan.cshtml.cs @@ -1,4 +1,4 @@ -namespace WebServer.Pages.Identity.TeamManagement +namespace Web.Server.Pages.Identity.TeamManagement { //public class ManagePlanModel : PageModel //{ diff --git a/Source/Modules/TenantIdentity/Web/Server/SignalR/NotificationHub.cs b/Source/Modules/TenantIdentity/Web/Server/SignalR/NotificationHub.cs index d21c6df9..9dad5e23 100644 --- a/Source/Modules/TenantIdentity/Web/Server/SignalR/NotificationHub.cs +++ b/Source/Modules/TenantIdentity/Web/Server/SignalR/NotificationHub.cs @@ -21,7 +21,7 @@ // applicationUser.IsOnline = true; // applicationUser.TabsOpen = 1; // await applicationUserManager.UpdateAsync(applicationUser); - // await Clients.All.SendAsync("UpdateOnlineUsers"); + // await Web.Clients.All.SendAsync("UpdateOnlineUsers"); // return; // } // if (applicationUser.IsOnline) @@ -46,7 +46,7 @@ // //ApplicationUserTeam applicationUserTeam = await applicationUserManager.GetCurrentTeamMembership(applicationUser); // //await Groups.RemoveFromGroupAsync(Context.ConnectionId, $"{applicationUserTeam.TeamId}{applicationUserTeam.Role}"); // //await Groups.RemoveFromGroupAsync(Context.ConnectionId, $"{applicationUserTeam.TeamId}"); - // await Clients.AllExcept(appUser.Id.ToString()).SendAsync("UpdateOnlineUsers"); + // await Web.Clients.AllExcept(appUser.Id.ToString()).SendAsync("UpdateOnlineUsers"); // } // } //} diff --git a/Source/Modules/TenantIdentity/Web/Server/TenantIdentityModuleStartup.cs b/Source/Modules/TenantIdentity/Web/Server/TenantIdentityModuleStartup.cs index 0c5ba46e..ce3e3263 100644 --- a/Source/Modules/TenantIdentity/Web/Server/TenantIdentityModuleStartup.cs +++ b/Source/Modules/TenantIdentity/Web/Server/TenantIdentityModuleStartup.cs @@ -57,8 +57,8 @@ public void ConfigureServices(IServiceCollection services, IConfiguration config }) .AddGoogle(options => { - options.ClientId = configuration["SocialLogins:Google:ClientId"]; - options.ClientSecret = configuration["SocialLogins:Google:ClientSecret"]; + options.ClientId = configuration["SocialLogins:Google:Web.ClientId"]; + options.ClientSecret = configuration["SocialLogins:Google:Web.ClientSecret"]; options.Scope.Add("profile"); options.Events.OnCreatingTicket = (context) => { diff --git a/Source/Shared/Client/BaseComponent.razor.cs b/Source/Shared/Client/BaseComponent.razor.cs index 8e882476..e2e3f5b1 100644 --- a/Source/Shared/Client/BaseComponent.razor.cs +++ b/Source/Shared/Client/BaseComponent.razor.cs @@ -12,12 +12,12 @@ namespace Shared.Client public partial class BaseComponent : ComponentBase { [Inject] - public HttpClientService HttpClientService { get; set; } + protected HttpClientService httpClientService { get; set; } [Inject] - public ValidationService ValidationService { get; set; } + protected ValidationService validationService { get; set; } [Inject] - public NavigationManager NavigationManager { get; set; } + protected NavigationManager navigationManager { get; set; } } } diff --git a/Source/Shared/Client/Components/Modals/DefaultModalOptions.cs b/Source/Shared/Client/Components/Modals/DefaultModalOptions.cs new file mode 100644 index 00000000..881f820d --- /dev/null +++ b/Source/Shared/Client/Components/Modals/DefaultModalOptions.cs @@ -0,0 +1,21 @@ +using Blazored.Modal; + +namespace Shared.Client.Components.Modals +{ + public class DefaultModalOptions + { + public static ModalOptions Modal + { + get + { + return new ModalOptions + { + OverlayCustomClass = "modaloverlay", + Position = ModalPosition.Middle, + HideCloseButton = true, + HideHeader = true + }; + } + } + } +} diff --git a/Source/Shared/Client/Components/Modals/DeletionReassuranceModal.razor b/Source/Shared/Client/Components/Modals/DeletionReassuranceModal.razor new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/Source/Shared/Client/Components/Modals/DeletionReassuranceModal.razor @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Source/Shared/Features/CQRS/Command/ICommand.cs b/Source/Shared/Features/CQRS/Command/ICommand.cs deleted file mode 100644 index 98225b9d..00000000 --- a/Source/Shared/Features/CQRS/Command/ICommand.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Shared.Features.CQRS.Command -{ - public interface ICommand - { - } -} diff --git a/Source/Shared/Features/EFCore/BaseDbContext.cs b/Source/Shared/Features/EFCore/BaseDbContext.cs index 7f8772fe..8cfae2f5 100644 --- a/Source/Shared/Features/EFCore/BaseDbContext.cs +++ b/Source/Shared/Features/EFCore/BaseDbContext.cs @@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Shared.Features.CQRS.DomainEvent; +using Shared.Features.Messaging.DomainEvent; using Shared.Features.Domain; using Shared.Features.DomainKernel; using Shared.Features.EFCore.Configuration; diff --git a/Source/Shared/Features/CQRS/Command/CommandDispatcher.cs b/Source/Shared/Features/Messaging/Command/CommandDispatcher.cs similarity index 95% rename from Source/Shared/Features/CQRS/Command/CommandDispatcher.cs rename to Source/Shared/Features/Messaging/Command/CommandDispatcher.cs index 65b682dd..5b94145b 100644 --- a/Source/Shared/Features/CQRS/Command/CommandDispatcher.cs +++ b/Source/Shared/Features/Messaging/Command/CommandDispatcher.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace Shared.Features.CQRS.Command +namespace Shared.Features.Messaging.Command { public class CommandDispatcher : ICommandDispatcher { diff --git a/Source/Shared/Features/Messaging/Command/ICommand.cs b/Source/Shared/Features/Messaging/Command/ICommand.cs new file mode 100644 index 00000000..e8dd4908 --- /dev/null +++ b/Source/Shared/Features/Messaging/Command/ICommand.cs @@ -0,0 +1,6 @@ +namespace Shared.Features.Messaging.Command +{ + public interface ICommand + { + } +} diff --git a/Source/Shared/Features/CQRS/Command/ICommandDispatcher.cs b/Source/Shared/Features/Messaging/Command/ICommandDispatcher.cs similarity index 87% rename from Source/Shared/Features/CQRS/Command/ICommandDispatcher.cs rename to Source/Shared/Features/Messaging/Command/ICommandDispatcher.cs index ce4d8ed9..bdfc2ea8 100644 --- a/Source/Shared/Features/CQRS/Command/ICommandDispatcher.cs +++ b/Source/Shared/Features/Messaging/Command/ICommandDispatcher.cs @@ -1,4 +1,4 @@ -namespace Shared.Features.CQRS.Command +namespace Shared.Features.Messaging.Command { public interface ICommandDispatcher { diff --git a/Source/Shared/Features/CQRS/Command/ICommandHandler.cs b/Source/Shared/Features/Messaging/Command/ICommandHandler.cs similarity index 88% rename from Source/Shared/Features/CQRS/Command/ICommandHandler.cs rename to Source/Shared/Features/Messaging/Command/ICommandHandler.cs index 479c1e6c..974d7b89 100644 --- a/Source/Shared/Features/CQRS/Command/ICommandHandler.cs +++ b/Source/Shared/Features/Messaging/Command/ICommandHandler.cs @@ -1,4 +1,4 @@ -namespace Shared.Features.CQRS.Command +namespace Shared.Features.Messaging.Command { public interface ICommandHandler where TCommand : ICommand { diff --git a/Source/Shared/Features/CQRS/DomainEvent/DomainEventDispatcher.cs b/Source/Shared/Features/Messaging/DomainEvent/DomainEventDispatcher.cs similarity index 94% rename from Source/Shared/Features/CQRS/DomainEvent/DomainEventDispatcher.cs rename to Source/Shared/Features/Messaging/DomainEvent/DomainEventDispatcher.cs index c2365721..f9c6958d 100644 --- a/Source/Shared/Features/CQRS/DomainEvent/DomainEventDispatcher.cs +++ b/Source/Shared/Features/Messaging/DomainEvent/DomainEventDispatcher.cs @@ -2,7 +2,7 @@ using Shared.Features.Domain; using Shared.Kernel.BuildingBlocks; -namespace Shared.Features.CQRS.DomainEvent +namespace Shared.Features.Messaging.DomainEvent { public class DomainEventDispatcher : IDomainEventDispatcher { diff --git a/Source/Shared/Features/CQRS/DomainEvent/IDomainEventDispatcher.cs b/Source/Shared/Features/Messaging/DomainEvent/IDomainEventDispatcher.cs similarity index 82% rename from Source/Shared/Features/CQRS/DomainEvent/IDomainEventDispatcher.cs rename to Source/Shared/Features/Messaging/DomainEvent/IDomainEventDispatcher.cs index d8aed78d..9c59c7fb 100644 --- a/Source/Shared/Features/CQRS/DomainEvent/IDomainEventDispatcher.cs +++ b/Source/Shared/Features/Messaging/DomainEvent/IDomainEventDispatcher.cs @@ -1,6 +1,6 @@ using Shared.Features.Domain; -namespace Shared.Features.CQRS.DomainEvent +namespace Shared.Features.Messaging.DomainEvent { public interface IDomainEventDispatcher { diff --git a/Source/Shared/Features/CQRS/DomainEvent/IDomainEventHandler.cs b/Source/Shared/Features/Messaging/DomainEvent/IDomainEventHandler.cs similarity index 82% rename from Source/Shared/Features/CQRS/DomainEvent/IDomainEventHandler.cs rename to Source/Shared/Features/Messaging/DomainEvent/IDomainEventHandler.cs index 75f8e1d9..8017a0d6 100644 --- a/Source/Shared/Features/CQRS/DomainEvent/IDomainEventHandler.cs +++ b/Source/Shared/Features/Messaging/DomainEvent/IDomainEventHandler.cs @@ -1,6 +1,6 @@ using Shared.Features.Domain; -namespace Shared.Features.CQRS.DomainEvent +namespace Shared.Features.Messaging.DomainEvent { public interface IDomainEventHandler where TDomainEvent : IDomainEvent { diff --git a/Source/Shared/Features/CQRS/IntegrationEvent/IIntegrationEventDispatcher.cs b/Source/Shared/Features/Messaging/IntegrationEvent/IIntegrationEventDispatcher.cs similarity index 89% rename from Source/Shared/Features/CQRS/IntegrationEvent/IIntegrationEventDispatcher.cs rename to Source/Shared/Features/Messaging/IntegrationEvent/IIntegrationEventDispatcher.cs index 7129475e..7ce13388 100644 --- a/Source/Shared/Features/CQRS/IntegrationEvent/IIntegrationEventDispatcher.cs +++ b/Source/Shared/Features/Messaging/IntegrationEvent/IIntegrationEventDispatcher.cs @@ -1,6 +1,6 @@ using Shared.Kernel.BuildingBlocks; -namespace Shared.Features.CQRS.IntegrationEvent +namespace Shared.Features.Messaging.IntegrationEvent { public interface IIntegrationEventDispatcher { diff --git a/Source/Shared/Features/CQRS/IntegrationEvent/IIntegrationEventHandler.cs b/Source/Shared/Features/Messaging/IntegrationEvent/IIntegrationEventHandler.cs similarity index 83% rename from Source/Shared/Features/CQRS/IntegrationEvent/IIntegrationEventHandler.cs rename to Source/Shared/Features/Messaging/IntegrationEvent/IIntegrationEventHandler.cs index ad72ef3a..fe243eac 100644 --- a/Source/Shared/Features/CQRS/IntegrationEvent/IIntegrationEventHandler.cs +++ b/Source/Shared/Features/Messaging/IntegrationEvent/IIntegrationEventHandler.cs @@ -1,6 +1,6 @@ using Shared.Kernel.BuildingBlocks; -namespace Shared.Features.CQRS.IntegrationEvent +namespace Shared.Features.Messaging.IntegrationEvent { public interface IIntegrationEventHandler where TIntegrationEvent : IIntegrationEvent { diff --git a/Source/Shared/Features/CQRS/IntegrationEvent/IntegrationEventDispatcher.cs b/Source/Shared/Features/Messaging/IntegrationEvent/IntegrationEventDispatcher.cs similarity index 94% rename from Source/Shared/Features/CQRS/IntegrationEvent/IntegrationEventDispatcher.cs rename to Source/Shared/Features/Messaging/IntegrationEvent/IntegrationEventDispatcher.cs index 990e74c9..dfa29497 100644 --- a/Source/Shared/Features/CQRS/IntegrationEvent/IntegrationEventDispatcher.cs +++ b/Source/Shared/Features/Messaging/IntegrationEvent/IntegrationEventDispatcher.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using Shared.Kernel.BuildingBlocks; -namespace Shared.Features.CQRS.IntegrationEvent +namespace Shared.Features.Messaging.IntegrationEvent { public class IntegrationEventDispatcher : IIntegrationEventDispatcher { diff --git a/Source/Shared/Features/CQRS/Query/BaseQueryHandler.cs b/Source/Shared/Features/Messaging/Query/BaseQueryHandler.cs similarity index 87% rename from Source/Shared/Features/CQRS/Query/BaseQueryHandler.cs rename to Source/Shared/Features/Messaging/Query/BaseQueryHandler.cs index bf4ff246..c5914b59 100644 --- a/Source/Shared/Features/CQRS/Query/BaseQueryHandler.cs +++ b/Source/Shared/Features/Messaging/Query/BaseQueryHandler.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; -namespace Shared.Features.CQRS.Query +namespace Shared.Features.Messaging.Query { public class BaseQueryHandler where T : DbContext where U : class { diff --git a/Source/Shared/Features/CQRS/Query/IQuery.cs b/Source/Shared/Features/Messaging/Query/IQuery.cs similarity index 55% rename from Source/Shared/Features/CQRS/Query/IQuery.cs rename to Source/Shared/Features/Messaging/Query/IQuery.cs index 58f80c69..7d2ce0cb 100644 --- a/Source/Shared/Features/CQRS/Query/IQuery.cs +++ b/Source/Shared/Features/Messaging/Query/IQuery.cs @@ -1,4 +1,4 @@ -namespace Shared.Features.CQRS.Query +namespace Shared.Features.Messaging.Query { public interface IQuery { diff --git a/Source/Shared/Features/CQRS/Query/IQueryDispatcher.cs b/Source/Shared/Features/Messaging/Query/IQueryDispatcher.cs similarity index 82% rename from Source/Shared/Features/CQRS/Query/IQueryDispatcher.cs rename to Source/Shared/Features/Messaging/Query/IQueryDispatcher.cs index 50b36a49..b74226d0 100644 --- a/Source/Shared/Features/CQRS/Query/IQueryDispatcher.cs +++ b/Source/Shared/Features/Messaging/Query/IQueryDispatcher.cs @@ -1,4 +1,4 @@ -namespace Shared.Features.CQRS.Query +namespace Shared.Features.Messaging.Query { public interface IQueryDispatcher { diff --git a/Source/Shared/Features/CQRS/Query/IQueryHandler.cs b/Source/Shared/Features/Messaging/Query/IQueryHandler.cs similarity index 81% rename from Source/Shared/Features/CQRS/Query/IQueryHandler.cs rename to Source/Shared/Features/Messaging/Query/IQueryHandler.cs index ae0b6b39..1fe22cda 100644 --- a/Source/Shared/Features/CQRS/Query/IQueryHandler.cs +++ b/Source/Shared/Features/Messaging/Query/IQueryHandler.cs @@ -1,4 +1,4 @@ -namespace Shared.Features.CQRS.Query +namespace Shared.Features.Messaging.Query { public interface IQueryHandler where TQuery : IQuery { diff --git a/Source/Shared/Features/CQRS/Query/QueryDispatcher.cs b/Source/Shared/Features/Messaging/Query/QueryDispatcher.cs similarity index 94% rename from Source/Shared/Features/CQRS/Query/QueryDispatcher.cs rename to Source/Shared/Features/Messaging/Query/QueryDispatcher.cs index 5558470e..67193428 100644 --- a/Source/Shared/Features/CQRS/Query/QueryDispatcher.cs +++ b/Source/Shared/Features/Messaging/Query/QueryDispatcher.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace Shared.Features.CQRS.Query +namespace Shared.Features.Messaging.Query { public class QueryDispatcher : IQueryDispatcher { diff --git a/Source/Shared/Features/CQRS/Registrator.cs b/Source/Shared/Features/Messaging/Registrator.cs similarity index 72% rename from Source/Shared/Features/CQRS/Registrator.cs rename to Source/Shared/Features/Messaging/Registrator.cs index c2bd7b8d..4c063f2b 100644 --- a/Source/Shared/Features/CQRS/Registrator.cs +++ b/Source/Shared/Features/Messaging/Registrator.cs @@ -1,21 +1,28 @@ -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Query; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using System.Reflection; -using Shared.Features.CQRS.Command; -using Shared.Features.CQRS.DomainEvent; -using Shared.Features.CQRS.IntegrationEvent; +using Shared.Features.Messaging.Command; +using Shared.Features.Messaging.DomainEvent; +using Shared.Features.Messaging.IntegrationEvent; -namespace Shared.Features.CQRS +namespace Shared.Features.Messaging { public static class Registrator { - public static IServiceCollection RegisterCQRS(this IServiceCollection services, Assembly[] assemblies) + public static IServiceCollection AddMessaging(this IServiceCollection services) { services.TryAddScoped(); services.TryAddScoped(); - services.TryAddScoped(); services.TryAddScoped(); + services.TryAddScoped(); + + return services; + } + + public static IServiceCollection AddMessagingForModule(this IServiceCollection services, Type moduleType) + { + var assemblies = new Assembly[] { moduleType.Assembly }; // INFO: Using https://www.nuget.org/packages/Scrutor for registering all Query and Command handlers by convention services.Scan(selector => @@ -37,6 +44,14 @@ public static IServiceCollection RegisterCQRS(this IServiceCollection services, }) .AsImplementedInterfaces() .WithScopedLifetime(); + + selector.FromAssemblies(assemblies) + .AddClasses(filter => + { + filter.AssignableTo(typeof(ICommandHandler<,>)); + }) + .AsImplementedInterfaces() + .WithScopedLifetime(); }); services.Scan(selector => { @@ -58,6 +73,7 @@ public static IServiceCollection RegisterCQRS(this IServiceCollection services, .AsImplementedInterfaces() .WithScopedLifetime(); }); + return services; } } diff --git a/Source/Shared/Features/Modules/IModule.cs b/Source/Shared/Features/Modules/IModule.cs new file mode 100644 index 00000000..c1fd953d --- /dev/null +++ b/Source/Shared/Features/Modules/IModule.cs @@ -0,0 +1,9 @@ +using System.Reflection; + +namespace Shared.Features.Modules +{ + public interface IModule + { + Assembly? FeaturesAssembly { get; } + } +} diff --git a/Source/Shared/Features/Modules/IModuleStartup.cs b/Source/Shared/Features/Modules/IModuleStartup.cs index 09430526..cfb8ddb0 100644 --- a/Source/Shared/Features/Modules/IModuleStartup.cs +++ b/Source/Shared/Features/Modules/IModuleStartup.cs @@ -2,14 +2,12 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using System.Reflection; namespace Shared.Features.Modules { public interface IModuleStartup { - public Assembly? FeaturesAssembly { get; } - void ConfigureServices(IServiceCollection services, IConfiguration configuration); + void ConfigureServices(IServiceCollection services, IConfiguration configuration = null); void Configure(IApplicationBuilder app, IHostEnvironment env); } } diff --git a/Source/Shared/Features/Modules/Registrator.cs b/Source/Shared/Features/Modules/Registrator.cs index ac21e568..336d73f3 100644 --- a/Source/Shared/Features/Modules/Registrator.cs +++ b/Source/Shared/Features/Modules/Registrator.cs @@ -3,45 +3,50 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Shared.Features.CQRS; +using Shared.Features.Messaging; namespace Shared.Features.Modules { public static class Registrator { - public static IServiceCollection AddModule(this IServiceCollection services, IConfiguration configuration) - where TStartup : IModuleStartup, new() + public static IServiceCollection AddModule(this IServiceCollection services, IConfiguration config = null) + where TModuleStartup : IModuleStartup { // Register assembly in MVC so it can find controllers of the module services.AddControllers().ConfigureApplicationPartManager(manager => - manager.ApplicationParts.Add(new AssemblyPart(typeof(TStartup).Assembly))); + manager.ApplicationParts.Add(new AssemblyPart(typeof(TModuleStartup).Assembly))); - var startup = new TStartup(); - startup.ConfigureServices(services, configuration); - - services.AddSingleton(new Module(startup)); + var moduleStartup = (IModuleStartup)Activator.CreateInstance(typeof(TModuleStartup)); + moduleStartup.ConfigureServices(services, config); return services; } - public static void AddModules(this IServiceCollection services) + public static IServiceCollection AddModule(this IServiceCollection services, IConfiguration config = null) + where TModule : class, IModule + where TModuleStartup : IModuleStartup { - var serviceProvider = services.BuildServiceProvider(); + // Register assembly in MVC so it can find controllers of the module + services.AddControllers().ConfigureApplicationPartManager(manager => + manager.ApplicationParts.Add(new AssemblyPart(typeof(TModuleStartup).Assembly))); - var startupModules = serviceProvider.GetRequiredService>(); + var moduleStartup = (IModuleStartup)Activator.CreateInstance(typeof(TModuleStartup)); + moduleStartup.ConfigureServices(services, config); - services.RegisterCQRS(startupModules.Where(sm => sm.Startup.FeaturesAssembly is not null).Select(sm => sm.Startup.FeaturesAssembly).ToArray()); + var module = ActivatorUtilities.CreateInstance(services.BuildServiceProvider()); + services.AddScoped(sp => module); + services.AddMessagingForModule(module.GetType()); + + return services; } - public static IApplicationBuilder UseModules(this IApplicationBuilder app, IHostEnvironment env) + public static IApplicationBuilder UseModulesMiddleware(this IApplicationBuilder app, IHostEnvironment env) { - // Adds endpoints defined in modules - var modules = app - .ApplicationServices - .GetRequiredService>(); - foreach (var module in modules) + using var scope = app.ApplicationServices.CreateAsyncScope(); + + foreach (var moduleStartup in scope.ServiceProvider.GetRequiredService>()) { - module.Startup.Configure(app, env); + moduleStartup.Configure(app, env); } return app; diff --git a/Source/Shared/Features/Server/BaseController.cs b/Source/Shared/Features/Server/BaseController.cs index b6a713af..82567e90 100644 --- a/Source/Shared/Features/Server/BaseController.cs +++ b/Source/Shared/Features/Server/BaseController.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; -using Shared.Features.CQRS.Command; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Command; +using Shared.Features.Messaging.Query; using Shared.Kernel.BuildingBlocks; using Shared.Kernel.BuildingBlocks.Services.ModelValidation; using SharedKernel.Interfaces; diff --git a/Source/Shared/Features/Server/ServerExecutionBase.cs b/Source/Shared/Features/Server/ServerExecutionBase.cs index dc9abf69..812ba2f2 100644 --- a/Source/Shared/Features/Server/ServerExecutionBase.cs +++ b/Source/Shared/Features/Server/ServerExecutionBase.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.DependencyInjection; -using Shared.Features.CQRS.Command; -using Shared.Features.CQRS.DomainEvent; -using Shared.Features.CQRS.IntegrationEvent; -using Shared.Features.CQRS.Query; +using Shared.Features.Messaging.Command; +using Shared.Features.Messaging.DomainEvent; +using Shared.Features.Messaging.IntegrationEvent; +using Shared.Features.Messaging.Query; using Shared.Kernel.BuildingBlocks; using Shared.Kernel.BuildingBlocks.Services.ModelValidation; diff --git a/Source/Web/Client/App.razor b/Source/Web/Client/App.razor index 717865dc..5e3ad7b9 100644 --- a/Source/Web/Client/App.razor +++ b/Source/Web/Client/App.razor @@ -1,12 +1,12 @@ -@using global::Client -@using global::Client.Layouts +@using global::Web.Client +@using global::Web.Client.Layouts - + - - - + + + @@ -30,10 +30,10 @@ - - - + + + - + diff --git a/Source/Web/Client/BuildingBlocks/Auth/Antiforgery/AntiforgeryTokenService.cs b/Source/Web/Client/BuildingBlocks/Auth/Antiforgery/AntiforgeryTokenService.cs index 90b2b5be..77bfd5e6 100644 --- a/Source/Web/Client/BuildingBlocks/Auth/Antiforgery/AntiforgeryTokenService.cs +++ b/Source/Web/Client/BuildingBlocks/Auth/Antiforgery/AntiforgeryTokenService.cs @@ -1,6 +1,6 @@ using Microsoft.JSInterop; -namespace Web.Client.BuildingBlocks.Authentication.Antiforgery +namespace Web.Web.Client.BuildingBlocks.Authentication.Antiforgery { public class AntiforgeryTokenService { diff --git a/Source/Web/Client/BuildingBlocks/Auth/AuthorizedHandler.cs b/Source/Web/Client/BuildingBlocks/Auth/AuthorizedHandler.cs index 701e98fe..1f200b92 100644 --- a/Source/Web/Client/BuildingBlocks/Auth/AuthorizedHandler.cs +++ b/Source/Web/Client/BuildingBlocks/Auth/AuthorizedHandler.cs @@ -1,9 +1,9 @@ using System.Net; using System.Net.Http; using System.Threading; -using Web.Client.BuildingBlocks.Authentication.Antiforgery; +using Web.Web.Client.BuildingBlocks.Authentication.Antiforgery; -namespace Web.Client.BuildingBlocks.Authentication +namespace Web.Web.Client.BuildingBlocks.Authentication { public class AuthorizedHandler : DelegatingHandler { diff --git a/Source/Web/Client/BuildingBlocks/Auth/HostAuthenticationStateProvider.cs b/Source/Web/Client/BuildingBlocks/Auth/HostAuthenticationStateProvider.cs index 3516d639..2a224e10 100644 --- a/Source/Web/Client/BuildingBlocks/Auth/HostAuthenticationStateProvider.cs +++ b/Source/Web/Client/BuildingBlocks/Auth/HostAuthenticationStateProvider.cs @@ -5,10 +5,10 @@ using System.Net.Http.Json; using System.Security.Claims; using Modules.IdentityModule.Web.DTOs; -using Web.Client.BuildingBlocks.Authentication.Antiforgery; +using Web.Web.Client.BuildingBlocks.Authentication.Antiforgery; using Shared.Kernel.BuildingBlocks.Auth.Constants; -namespace Web.Client.BuildingBlocks.Authentication +namespace Web.Web.Client.BuildingBlocks.Authentication { public class HostAuthenticationStateProvider : AuthenticationStateProvider { diff --git a/Source/Web/Client/BuildingBlocks/Layouts/BaseLayout.razor.cs b/Source/Web/Client/BuildingBlocks/Layouts/BaseLayout.razor.cs index fa3b0746..815d01be 100644 --- a/Source/Web/Client/BuildingBlocks/Layouts/BaseLayout.razor.cs +++ b/Source/Web/Client/BuildingBlocks/Layouts/BaseLayout.razor.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; -namespace Client.Layouts +namespace Web.Client.Layouts { public partial class BaseLayout : LayoutComponentBase { diff --git a/Source/Web/Client/BuildingBlocks/Layouts/MainLayout.razor.cs b/Source/Web/Client/BuildingBlocks/Layouts/MainLayout.razor.cs index acb702b5..00c6b2c3 100644 --- a/Source/Web/Client/BuildingBlocks/Layouts/MainLayout.razor.cs +++ b/Source/Web/Client/BuildingBlocks/Layouts/MainLayout.razor.cs @@ -1,4 +1,4 @@ -namespace Client.Layouts +namespace Web.Client.Layouts { public partial class MainLayout { diff --git a/Source/Web/Client/BuildingBlocks/Layouts/MainLayoutMenu/TeamsOverviewComp.razor.cs b/Source/Web/Client/BuildingBlocks/Layouts/MainLayoutMenu/TeamsOverviewComp.razor.cs index bf66e6ad..73b957dd 100644 --- a/Source/Web/Client/BuildingBlocks/Layouts/MainLayoutMenu/TeamsOverviewComp.razor.cs +++ b/Source/Web/Client/BuildingBlocks/Layouts/MainLayoutMenu/TeamsOverviewComp.razor.cs @@ -1,14 +1,14 @@ using Modules.IdentityModule.Web.DTOs; using Shared.Client; -namespace Client.Layouts.MainLayoutMenu +namespace Web.Client.Layouts.MainLayoutMenu { public partial class TeamsOverviewComponentBase : BaseComponent { protected IEnumerable teams; protected override async Task OnInitializedAsync() { - teams = await HttpClientService.GetFromAPIAsync>("/user/allTeams"); + teams = await httpClientService.GetFromAPIAsync>("/user/allTeams"); } protected bool expanded = true; public void Click() diff --git a/Source/Web/Client/BuildingBlocks/Wrappers/ExceptionHandlingWrapper.razor b/Source/Web/Client/BuildingBlocks/Wrappers/ExceptionHandlingWrapper.razor index 2a4fb284..6e026c1f 100644 --- a/Source/Web/Client/BuildingBlocks/Wrappers/ExceptionHandlingWrapper.razor +++ b/Source/Web/Client/BuildingBlocks/Wrappers/ExceptionHandlingWrapper.razor @@ -1,4 +1,4 @@ -@using global::Client.Components +@using global::Web.Client.Components @inherits BaseComponent diff --git a/Source/Web/Client/Components/CustomErrorBoundary.cs b/Source/Web/Client/Components/CustomErrorBoundary.cs index 7af9149b..7466546e 100644 --- a/Source/Web/Client/Components/CustomErrorBoundary.cs +++ b/Source/Web/Client/Components/CustomErrorBoundary.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -namespace Client.Components +namespace Web.Client.Components { public class CustomErrorBoundary : ErrorBoundary { diff --git a/Source/Web/Client/Components/Diagrams/Nodes/UserNode.cs b/Source/Web/Client/Components/Diagrams/Nodes/UserNode.cs index bb59dbe6..7c9aa4dd 100644 --- a/Source/Web/Client/Components/Diagrams/Nodes/UserNode.cs +++ b/Source/Web/Client/Components/Diagrams/Nodes/UserNode.cs @@ -1,8 +1,8 @@ using Blazor.Diagrams.Core.Models; using Modules.IdentityModule.Web.DTOs; -using Client.Diagrams.Ports; +using Web.Client.Diagrams.Ports; -namespace Client.Diagrams.Nodes +namespace Web.Client.Diagrams.Nodes { public class UserNode : NodeModel { diff --git a/Source/Web/Client/Components/Diagrams/Ports/NodePort.cs b/Source/Web/Client/Components/Diagrams/Ports/NodePort.cs index f5f954c0..7511df20 100644 --- a/Source/Web/Client/Components/Diagrams/Ports/NodePort.cs +++ b/Source/Web/Client/Components/Diagrams/Ports/NodePort.cs @@ -1,6 +1,6 @@ using Blazor.Diagrams.Core.Models; -namespace Client.Diagrams.Ports +namespace Web.Client.Diagrams.Ports { public class NodePort : PortModel { diff --git a/Source/Web/Client/IAssemblyMarker.cs b/Source/Web/Client/IAssemblyMarker.cs index 5e91ac7e..dd6cf840 100644 --- a/Source/Web/Client/IAssemblyMarker.cs +++ b/Source/Web/Client/IAssemblyMarker.cs @@ -1,4 +1,4 @@ -namespace Client.Misc +namespace Web.Client.Misc { public interface IAssemblyMarker { diff --git a/Source/Web/Client/Pages/Channels.razor b/Source/Web/Client/Pages/Channels.razor index 7a7b940d..901b31c4 100644 --- a/Source/Web/Client/Pages/Channels.razor +++ b/Source/Web/Client/Pages/Channels.razor @@ -1,6 +1,6 @@ @page "/channels" @using Shared.Kernel.BuildingBlocks.Authorization.Attributes -@using global::Client.Pages +@using global::Web.Client.Pages @attribute [AuthorizeTenantUser] @inherits ChannelsBase @@ -20,7 +20,7 @@ @foreach(var channel in channels) {
- +
}
diff --git a/Source/Web/Client/Pages/Channels.razor.cs b/Source/Web/Client/Pages/Channels.razor.cs index 9bdf5709..d1283f8a 100644 --- a/Source/Web/Client/Pages/Channels.razor.cs +++ b/Source/Web/Client/Pages/Channels.razor.cs @@ -1,7 +1,7 @@ using Modules.Channels.Web.Shared.DTOs.ChannelAggregate; using Shared.Client; -namespace Client.Pages +namespace Web.Client.Pages { public partial class ChannelsBase : BaseComponent { @@ -12,11 +12,11 @@ protected override async Task OnInitializedAsync() { //HubConnection.On("UpdateChannels", async () => //{ - // channels = await HttpClientService.GetFromAPIAsync>("/channel"); + // channels = await HttpWeb.ClientService.GetFromAPIAsync>("/channel"); // StateHasChanged(); //}); - channels = await HttpClientService.GetFromAPIAsync>("/channel"); + channels = await httpClientService.GetFromAPIAsync>("/channel"); loading = false; } @@ -27,7 +27,7 @@ protected async Task CreateChannel(string name) { Name = name }; - await HttpClientService.PostToAPIAsync("/channel", createChannel); + await httpClientService.PostToAPIAsync("/channel", createChannel); channelName = string.Empty; } @@ -37,7 +37,7 @@ protected async Task ChangeChannelName(string name) { Name = name }; - await HttpClientService.PostToAPIAsync("/channel", changeChannelName); + await httpClientService.PostToAPIAsync("/channel", changeChannelName); } private async Task SendMessage(string message) diff --git a/Source/Web/Client/Pages/Dashboard.razor.cs b/Source/Web/Client/Pages/Dashboard.razor.cs index d8a5daaa..7a78f6d5 100644 --- a/Source/Web/Client/Pages/Dashboard.razor.cs +++ b/Source/Web/Client/Pages/Dashboard.razor.cs @@ -3,7 +3,7 @@ using Shared.Client; using Shared.Kernel.BuildingBlocks.Services.Http; -namespace Client.Components.Dashboard.Pages +namespace Web.Client.Components.Dashboard.Pages { public partial class Dashboard : BaseComponent { diff --git a/Source/Web/Client/Pages/ManageTeam.razor b/Source/Web/Client/Pages/ManageTeam.razor index 969ef358..5a91d2c7 100644 --- a/Source/Web/Client/Pages/ManageTeam.razor +++ b/Source/Web/Client/Pages/ManageTeam.razor @@ -9,16 +9,16 @@ {
- +
- +
- +
- +
} diff --git a/Source/Web/Client/Pages/ManageTeam.razor.cs b/Source/Web/Client/Pages/ManageTeam.razor.cs index 976c9039..82e3f240 100644 --- a/Source/Web/Client/Pages/ManageTeam.razor.cs +++ b/Source/Web/Client/Pages/ManageTeam.razor.cs @@ -1,7 +1,7 @@ using Modules.IdentityModule.Web.DTOs; using Shared.Client; -namespace Web.Client.Pages +namespace Web.Web.Client.Pages { public partial class ManageTeamBase : BaseComponent { @@ -9,12 +9,12 @@ public partial class ManageTeamBase : BaseComponent protected TeamAdminInfoDTO teamAdminInfo; protected override async Task OnInitializedAsync() { - teamAdminInfo = await HttpClientService.GetFromAPIAsync("/team"); + teamAdminInfo = await httpClientService.GetFromAPIAsync("/team"); loading = false; //HubConnection.On("UpdateAdminInformation", async () => //{ - // teamAdminInfo = await HttpClientService.GetFromAPIAsync("/team"); + // teamAdminInfo = await HttpWeb.ClientService.GetFromAPIAsync("/team"); // StateHasChanged(); //}); } diff --git a/Source/Web/Client/Pages/Topic.razor b/Source/Web/Client/Pages/Topic.razor index 16d52a24..27bf353f 100644 --- a/Source/Web/Client/Pages/Topic.razor +++ b/Source/Web/Client/Pages/Topic.razor @@ -1,4 +1,5 @@ @page "/Topics" +@inherits BaseComponent
diff --git a/Source/Web/Client/Pages/Topic.razor.cs b/Source/Web/Client/Pages/Topic.razor.cs index ed22e4ba..8b05cb15 100644 --- a/Source/Web/Client/Pages/Topic.razor.cs +++ b/Source/Web/Client/Pages/Topic.razor.cs @@ -3,9 +3,9 @@ using Microsoft.AspNetCore.Components.Web; using Shared.Client; -namespace Client.Pages +namespace Web.Client.Pages { - public partial class Topic : BaseComponent + public partial class Topic { [Parameter] public Guid TopicId { get; set; } @@ -37,7 +37,7 @@ protected override async Task OnInitializedAsync() public void OnDrop(DragEventArgs e) { - //var position = diagram.GetRelativeMousePoint(e.ClientX, e.ClientY); + //var position = diagram.GetRelativeMousePoint(e.Web.ClientX, e.Web.ClientY); //Point point = new Point(position.X, position.Y); //NodeModel nodeModel = draggedLearningRessource.LearningRessourceType switch //{ diff --git a/Source/Web/Client/Program.cs b/Source/Web/Client/Program.cs index d1274d19..eb8d18d9 100644 --- a/Source/Web/Client/Program.cs +++ b/Source/Web/Client/Program.cs @@ -3,13 +3,13 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using System.Net.Http; -using Blazored.Modal; using Shared.Kernel.BuildingBlocks.Authorization; -using Web.Client.BuildingBlocks.Authentication; -using Web.Client.BuildingBlocks.Authentication.Antiforgery; +using Web.Web.Client.BuildingBlocks.Authentication; +using Web.Web.Client.BuildingBlocks.Authentication.Antiforgery; using Shared.Kernel.BuildingBlocks.Services.Http; +using Blazored.Modal; -namespace Client +namespace Web.Client { public class Program { @@ -17,21 +17,18 @@ public static async Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); - #region HttpClients builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); builder.Services.AddScoped(); builder.Services.AddHttpClient("default", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)); builder.Services.AddTransient(sp => sp.GetRequiredService().CreateClient("default")); builder.Services.AddTransient(); - builder.Services.AddHttpClient("authorizedClient", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)) + builder.Services.AddHttpClient("authorizedWeb.Client", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)) .AddHttpMessageHandler(); - #endregion - #region Authentication + builder.Services.AddSingleton(); builder.Services.TryAddSingleton(); builder.Services.TryAddSingleton(sp => (HostAuthenticationStateProvider)sp.GetRequiredService()); builder.Services.RegisterAuthorization(); - #endregion builder.Services.AddBlazoredModal(); await builder.Build().RunAsync(); diff --git a/Source/Web/Client/Properties/launchSettings.json b/Source/Web/Client/Properties/launchSettings.json index b7d356c3..efb7e3d5 100644 --- a/Source/Web/Client/Properties/launchSettings.json +++ b/Source/Web/Client/Properties/launchSettings.json @@ -16,7 +16,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "WebClient": { + "WebWeb.Client": { "commandName": "Project", "dotnetRunMessages": "true", "launchBrowser": true, diff --git a/Source/Web/Client/_Imports.razor b/Source/Web/Client/_Imports.razor index 809f72a8..763d951d 100644 --- a/Source/Web/Client/_Imports.razor +++ b/Source/Web/Client/_Imports.razor @@ -6,7 +6,7 @@ @using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop -@using Client +@using Web.Client @using Microsoft.AspNetCore.Components.Authorization @using System.Security.Claims @using Microsoft.AspNetCore.Authorization @@ -16,7 +16,6 @@ @using System.Text.Json @using System.Net @using System.ComponentModel.DataAnnotations -@using Client.Components @using FluentValidation @using Modules.IdentityModule.Web.DTOs @using Microsoft.AspNetCore.SignalR.Client diff --git a/Source/Web/Server/BuildingBlocks/AntiforgeryToken/Registrator.cs b/Source/Web/Server/BuildingBlocks/AntiforgeryToken/Registrator.cs index 11c06035..75ad0cd5 100644 --- a/Source/Web/Server/BuildingBlocks/AntiforgeryToken/Registrator.cs +++ b/Source/Web/Server/BuildingBlocks/AntiforgeryToken/Registrator.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; -namespace WebServer.Modules.ModelValidation +namespace Web.Server.Modules.ModelValidation { public static class Registrator { diff --git a/Source/Web/Server/BuildingBlocks/Registrator.cs b/Source/Web/Server/BuildingBlocks/Registrator.cs index 23785c50..637d7f6d 100644 --- a/Source/Web/Server/BuildingBlocks/Registrator.cs +++ b/Source/Web/Server/BuildingBlocks/Registrator.cs @@ -5,7 +5,7 @@ using Web.Server.BuildingBlocks.ModelValidation; using Web.Server.BuildingBlocks.SecurityHeaders; using Web.Server.BuildingBlocks.Swagger; -using WebServer.Modules.ModelValidation; +using Web.Server.Modules.ModelValidation; namespace Web.Server.BuildingBlocks { diff --git a/Source/Web/Server/Dockerfile b/Source/Web/Server/Dockerfile index b14537d4..244c1417 100644 --- a/Source/Web/Server/Dockerfile +++ b/Source/Web/Server/Dockerfile @@ -10,7 +10,7 @@ EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src -COPY ["Source/Web/WebServer/WebServer.csproj", "Source/Web/WebServer/"] +COPY ["Source/Web/Web.Server/Web.Server.csproj", "Source/Web/Web.Server/"] COPY ["Source/Modules/ChannelModule/Web/Server/ChannelModule.Server.csproj", "Source/Modules/ChannelModule/Web/Server/"] COPY ["Source/Shared/SharedKernel/SharedKernel.csproj", "Source/Shared/SharedKernel/"] COPY ["Source/Modules/ChannelModule/Layers/Application/ChannelModule.Application.csproj", "Source/Modules/ChannelModule/Layers/Application/"] @@ -30,21 +30,21 @@ COPY ["Source/Modules/TenantIdentity/Layers/Features/TenantIdentity.Features.csp COPY ["Source/Modules/TenantIdentity/Layers/Domain/TenantIdentity.Domain.csproj", "Source/Modules/TenantIdentity/Layers/Domain/"] COPY ["Source/Modules/TenantIdentity/Web/DTOs/TenantIdentity.DTOs.csproj", "Source/Modules/TenantIdentity/Web/DTOs/"] COPY ["Source/Shared/Modules/Web/Server/ModulesShared.Server.csproj", "Source/Shared/Modules/Web/Server/"] -COPY ["Source/Web/Client/Client.csproj", "Source/Web/Client/"] -COPY ["Source/Modules/ChannelModule/Web/Client/ChannelModule.Client.csproj", "Source/Modules/ChannelModule/Web/Client/"] -COPY ["Source/Shared/Modules/Web/Client/ModulesShared.Client.csproj", "Source/Shared/Modules/Web/Client/"] -COPY ["Source/Modules/SubscriptionModule/Web/Client/SubscriptionModule.Client.csproj", "Source/Modules/SubscriptionModule/Web/Client/"] +COPY ["Source/Web/Web.Client/Web.Client.csproj", "Source/Web/Web.Client/"] +COPY ["Source/Modules/ChannelModule/Web/Web.Client/ChannelModule.Web.Client.csproj", "Source/Modules/ChannelModule/Web/Web.Client/"] +COPY ["Source/Shared/Modules/Web/Web.Client/ModulesShared.Web.Client.csproj", "Source/Shared/Modules/Web/Web.Client/"] +COPY ["Source/Modules/SubscriptionModule/Web/Web.Client/SubscriptionModule.Web.Client.csproj", "Source/Modules/SubscriptionModule/Web/Web.Client/"] COPY ["Source/Modules/SubscriptionModule/Web/DTOs/SubscriptionModule.DTOs.csproj", "Source/Modules/SubscriptionModule/Web/DTOs/"] -COPY ["Source/Modules/TenantIdentity/Web/Client/TenantIdentity.Client.csproj", "Source/Modules/TenantIdentity/Web/Client/"] -RUN dotnet restore "Source/Web/WebServer/WebServer.csproj" +COPY ["Source/Modules/TenantIdentity/Web/Web.Client/TenantIdentity.Web.Client.csproj", "Source/Modules/TenantIdentity/Web/Web.Client/"] +RUN dotnet restore "Source/Web/Web.Server/Web.Server.csproj" COPY . . -WORKDIR "/src/Source/Web/WebServer" -RUN dotnet build "WebServer.csproj" -c Release -o /app/build +WORKDIR "/src/Source/Web/Web.Server" +RUN dotnet build "Web.Server.csproj" -c Release -o /app/build FROM build AS publish -RUN dotnet publish "WebServer.csproj" -c Release -o /app/publish /p:UseAppHost=false +RUN dotnet publish "Web.Server.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "WebServer.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "Web.Server.dll"] \ No newline at end of file diff --git a/Source/Web/Server/Dockerfile.original b/Source/Web/Server/Dockerfile.original index 3df27911..3118ba5c 100644 --- a/Source/Web/Server/Dockerfile.original +++ b/Source/Web/Server/Dockerfile.original @@ -10,22 +10,22 @@ EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src -COPY ["Source/Web/WebServer/WebServer.csproj", "Source/Web/WebServer/"] -COPY ["Source/Web/Client/Client.csproj", "Source/Web/Client/"] +COPY ["Source/Web/Web.Server/Web.Server.csproj", "Source/Web/Web.Server/"] +COPY ["Source/Web/Web.Client/Web.Client.csproj", "Source/Web/Web.Client/"] COPY ["Source/Modules/TenantIdentity/TenantIdentity/TenantIdentity.csproj", "Source/Modules/TenantIdentity/TenantIdentity/"] COPY ["Source/Modules/LandingPagesModule/LandingPagesModule/LandingPagesModule.csproj", "Source/Modules/LandingPagesModule/LandingPagesModule/"] COPY ["Source/Modules/SubscriptionModule/SubscriptionModule/SubscriptionModule.csproj", "Source/Modules/SubscriptionModule/SubscriptionModule/"] COPY ["Source/Modules/TenantTenantIdentity/TenantTenantIdentity/TenantTenantIdentity.csproj", "Source/Modules/TenantTenantIdentity/TenantTenantIdentity/"] COPY ["Source/Shared.SharedKernel/Shared.SharedKernel.csproj", "Source/Shared.SharedKernel/"] -RUN dotnet restore "Source/Web/WebServer/WebServer.csproj" +RUN dotnet restore "Source/Web/Web.Server/Web.Server.csproj" COPY . . -WORKDIR "/src/Source/Web/WebServer" -RUN dotnet build "WebServer.csproj" -c Release -o /app/build +WORKDIR "/src/Source/Web/Web.Server" +RUN dotnet build "Web.Server.csproj" -c Release -o /app/build FROM build AS publish -RUN dotnet publish "WebServer.csproj" -c Release -o /app/publish /p:UseAppHost=false +RUN dotnet publish "Web.Server.csproj" -c Release -o /app/publish /p:UseAppHost=false FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "WebServer.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "Web.Server.dll"] \ No newline at end of file diff --git a/Source/Web/Server/Pages/Error.cshtml b/Source/Web/Server/Pages/Error.cshtml index 6415b035..4f134ddf 100644 --- a/Source/Web/Server/Pages/Error.cshtml +++ b/Source/Web/Server/Pages/Error.cshtml @@ -1,5 +1,5 @@ @page -@model WebServer.Pages.ErrorModel +@model Web.Server.Pages.ErrorModel @{ ViewData["Title"] = "Error"; } diff --git a/Source/Web/Server/Pages/Error.cshtml.cs b/Source/Web/Server/Pages/Error.cshtml.cs index 17a30cfa..aa33e025 100644 --- a/Source/Web/Server/Pages/Error.cshtml.cs +++ b/Source/Web/Server/Pages/Error.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging; using System.Diagnostics; -namespace WebServer.Pages +namespace Web.Server.Pages { [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] [IgnoreAntiforgeryToken] diff --git a/Source/Web/Server/Pages/Shared/_Layout.cshtml b/Source/Web/Server/Pages/Shared/_Layout.cshtml index b1f86bce..9895e49d 100644 --- a/Source/Web/Server/Pages/Shared/_Layout.cshtml +++ b/Source/Web/Server/Pages/Shared/_Layout.cshtml @@ -7,7 +7,7 @@ CrispyCollab - + diff --git a/Source/Web/Server/Pages/_Host.cshtml b/Source/Web/Server/Pages/_Host.cshtml index 474dcb26..69ef37dc 100644 --- a/Source/Web/Server/Pages/_Host.cshtml +++ b/Source/Web/Server/Pages/_Host.cshtml @@ -17,7 +17,7 @@ - + diff --git a/Source/Web/Server/Pages/_ViewImports.cshtml b/Source/Web/Server/Pages/_ViewImports.cshtml index c41ac542..deb6ec88 100644 --- a/Source/Web/Server/Pages/_ViewImports.cshtml +++ b/Source/Web/Server/Pages/_ViewImports.cshtml @@ -2,7 +2,7 @@ @using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.Authentication @using Microsoft.AspNetCore.Authorization -@using WebServer.Pages +@using Web.Server.Pages @using Web.Client @namespace Server.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/Source/Web/Server/Program.cs b/Source/Web/Server/Program.cs index eb7a2bce..1053c4af 100644 --- a/Source/Web/Server/Program.cs +++ b/Source/Web/Server/Program.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using System; -namespace WebServer +namespace Web.Server { public class Program { @@ -64,7 +64,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) => .ConfigureAppConfiguration((hostBuilderContext, configuration) => { //configuration.AddAzureKeyVault(new Uri(""), - // new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityClientId = "b803e77c-0003-4a3a-8d33-861eb2e3ebbf" })); + // new DefaultAzureCredential(new DefaultAzureCredentialOptions { ManagedIdentityWeb.ClientId = "b803e77c-0003-4a3a-8d33-861eb2e3ebbf" })); }) .ConfigureWebHostDefaults(webBuilder => { diff --git a/Source/Web/Server/Properties/launchSettings.json b/Source/Web/Server/Properties/launchSettings.json index dd78050c..0725268f 100644 --- a/Source/Web/Server/Properties/launchSettings.json +++ b/Source/Web/Server/Properties/launchSettings.json @@ -15,7 +15,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "WebServer": { + "Web.Server": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { diff --git a/Source/Web/Server/Startup.cs b/Source/Web/Server/Startup.cs index 6cd29c96..e4644f30 100644 --- a/Source/Web/Server/Startup.cs +++ b/Source/Web/Server/Startup.cs @@ -9,7 +9,7 @@ using Modules.TenantIdentity.Web.Server; using Web.Server.BuildingBlocks; -namespace WebServer +namespace Web.Server { public class Startup { diff --git a/Source/Web/Server/wwwroot/js/site.js b/Source/Web/Server/wwwroot/js/site.js index 8b867040..15b5e317 100644 --- a/Source/Web/Server/wwwroot/js/site.js +++ b/Source/Web/Server/wwwroot/js/site.js @@ -1,4 +1,4 @@ -// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification +// Please see documentation at https://docs.microsoft.com/aspnet/core/Web.Client-side/bundling-and-minification // for details on configuring this project to bundle and minify static web assets. // Write your JavaScript code.