From 29f5662694cacc162f929eb5cd0cdeff90c187aa Mon Sep 17 00:00:00 2001 From: Ahmet Date: Thu, 24 Sep 2020 13:29:06 +0300 Subject: [PATCH] Added empty TenantManagement Blazor project --- .../Volo.Abp.TenantManagement.sln | 7 ++++ ...TenantManagementBlazorAutoMapperProfile.cs | 14 +++++++ .../AbpTenantManagementBlazorModule.cs | 37 +++++++++++++++++++ .../FodyWeavers.xml | 3 ++ .../FodyWeavers.xsd | 30 +++++++++++++++ .../Menus/MyProjectNameMenuContributor.cs | 23 ++++++++++++ .../Menus/MyProjectNameMenus.cs | 11 ++++++ .../TenantManagement/Tenants/Index.razor | 8 ++++ .../Volo.Abp.TenantManagement.Blazor.csproj | 20 ++++++++++ .../_Import.razor | 5 +++ 10 files changed, 158 insertions(+) create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorAutoMapperProfile.cs create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xml create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xsd create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenuContributor.cs create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenus.cs create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/Tenants/Index.razor create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj create mode 100644 modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Import.razor diff --git a/modules/tenant-management/Volo.Abp.TenantManagement.sln b/modules/tenant-management/Volo.Abp.TenantManagement.sln index 99ca26e1f0..1e14ca56a7 100644 --- a/modules/tenant-management/Volo.Abp.TenantManagement.sln +++ b/modules/tenant-management/Volo.Abp.TenantManagement.sln @@ -35,6 +35,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.TenantManagement.T EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.TenantManagement.Domain.Tests", "test\Volo.Abp.TenantManagement.Domain.Tests\Volo.Abp.TenantManagement.Domain.Tests.csproj", "{F7219BE2-4588-489C-9D31-647C59694C03}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.TenantManagement.Blazor", "src\Volo.Abp.TenantManagement.Blazor\Volo.Abp.TenantManagement.Blazor.csproj", "{05040C16-B531-446A-B406-277E44D147C0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,6 +99,10 @@ Global {F7219BE2-4588-489C-9D31-647C59694C03}.Debug|Any CPU.Build.0 = Debug|Any CPU {F7219BE2-4588-489C-9D31-647C59694C03}.Release|Any CPU.ActiveCfg = Release|Any CPU {F7219BE2-4588-489C-9D31-647C59694C03}.Release|Any CPU.Build.0 = Release|Any CPU + {05040C16-B531-446A-B406-277E44D147C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05040C16-B531-446A-B406-277E44D147C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05040C16-B531-446A-B406-277E44D147C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05040C16-B531-446A-B406-277E44D147C0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -116,6 +122,7 @@ Global {F75B4C54-A5F1-4101-99F5-A5B868A5146B} = {C6941869-A9FC-4BEA-AD3F-C1E104826ECA} {C3BAD6E8-00CD-4283-9416-64287BB5B265} = {C6941869-A9FC-4BEA-AD3F-C1E104826ECA} {F7219BE2-4588-489C-9D31-647C59694C03} = {C6941869-A9FC-4BEA-AD3F-C1E104826ECA} + {05040C16-B531-446A-B406-277E44D147C0} = {799CA525-4748-421A-9892-05C68BB2FA13} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7C258726-2CE0-44D3-A2D7-71812E8F505C} diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorAutoMapperProfile.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorAutoMapperProfile.cs new file mode 100644 index 0000000000..12564ad7de --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorAutoMapperProfile.cs @@ -0,0 +1,14 @@ +using AutoMapper; + +namespace Volo.Abp.TenantManagement.Blazor +{ + public class AbpTenantManagementBlazorAutoMapperProfile : Profile + { + public AbpTenantManagementBlazorAutoMapperProfile() + { + /* You can configure your AutoMapper mapping configuration here. + * Alternatively, you can split your mapping configurations + * into multiple profile classes for a better organization. */ + } + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs new file mode 100644 index 0000000000..1429cf9d4a --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/AbpTenantManagementBlazorModule.cs @@ -0,0 +1,37 @@ +using Microsoft.Extensions.DependencyInjection; +using MyCompanyName.MyProjectName.Blazor; +using MyCompanyName.MyProjectName.Blazor.Menus; +using Volo.Abp.AspNetCore.Components.WebAssembly.Theming.Routing; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.UI.Navigation; + +namespace Volo.Abp.TenantManagement.Blazor +{ + [DependsOn( + typeof(AbpAutoMapperModule), + typeof(AbpTenantManagementHttpApiClientModule) + )] + public class AbpTenantManagementBlazorModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAutoMapperObjectMapper(); + + Configure(options => + { + options.AddProfile(validate: true); + }); + + Configure(options => + { + options.MenuContributors.Add(new MyProjectNameMenuContributor()); + }); + + Configure(options => + { + options.AdditionalAssemblies.Add(typeof(AbpTenantManagementBlazorModule).Assembly); + }); + } + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xml new file mode 100644 index 0000000000..00e1d9a1c1 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xsd b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenuContributor.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenuContributor.cs new file mode 100644 index 0000000000..11062a5e2a --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenuContributor.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Volo.Abp.UI.Navigation; + +namespace MyCompanyName.MyProjectName.Blazor.Menus +{ + public class MyProjectNameMenuContributor : IMenuContributor + { + public async Task ConfigureMenuAsync(MenuConfigurationContext context) + { + if (context.Menu.Name == StandardMenus.Main) + { + await ConfigureMainMenu(context); + } + } + + private Task ConfigureMainMenu(MenuConfigurationContext context) + { + //Add main menu items. + + return Task.CompletedTask; + } + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenus.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenus.cs new file mode 100644 index 0000000000..18d64be308 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Menus/MyProjectNameMenus.cs @@ -0,0 +1,11 @@ +namespace MyCompanyName.MyProjectName.Blazor.Menus +{ + public class MyProjectNameMenus + { + private const string Prefix = "MyProjectName"; + + //Add your menu items here... + //public const string Home = Prefix + ".MyNewMenuItem"; + + } +} \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/Tenants/Index.razor b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/Tenants/Index.razor new file mode 100644 index 0000000000..fccf9239d6 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/Tenants/Index.razor @@ -0,0 +1,8 @@ +@page "/TenantManagement/Tenants" +@using Microsoft.Extensions.Localization +@using Volo.Abp.TenantManagement.Localization +@inject IStringLocalizer L +@{ +} +

MyProjectName

+

@L["SamplePageMessage"]

\ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj new file mode 100644 index 0000000000..1bcaeccb0b --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Volo.Abp.TenantManagement.Blazor.csproj @@ -0,0 +1,20 @@ + + + + + + + netstandard2.1 + 3.0 + Volo.Abp.TenantManagement.Blazor + + + + + + + + + + + diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Import.razor b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Import.razor new file mode 100644 index 0000000000..4685ac9893 --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/_Import.razor @@ -0,0 +1,5 @@ +@using Microsoft.AspNetCore.Components.Web +@using Volo.Abp.AspNetCore.Components.WebAssembly +@using Volo.Abp.BlazoriseUI +@using Blazorise +@using Blazorise.DataGrid \ No newline at end of file