From db1d09f68dd1c201b2591f52386f615209442bd8 Mon Sep 17 00:00:00 2001 From: Halil ibrahim Kalkan Date: Sun, 10 Mar 2019 19:49:14 +0300 Subject: [PATCH] #851 Added empty feature management module. --- .../Abp.FeatureManagement.sln.DotSettings | 7 + .../Volo.Abp.FeatureManagement.sln | 123 ++++++++++++++++++ ...Volo.Abp.FeatureManagement.sln.DotSettings | 6 + ...ureManagement.Application.Contracts.csproj | 26 ++++ ...ureManagementApplicationContractsModule.cs | 37 ++++++ ...eManagementPermissionDefinitionProvider.cs | 19 +++ .../FeatureManagementPermissions.cs | 15 +++ .../Localization/ApplicationContracts/en.json | 6 + .../ApplicationContracts/pt-BR.json | 6 + .../ApplicationContracts/zh-Hans.json | 6 + ...o.Abp.FeatureManagement.Application.csproj | 16 +++ ...eManagementApplicationAutoMapperProfile.cs | 12 ++ .../FeatureManagementApplicationModule.cs | 28 ++++ ...tureManagementSettingDefinitionProvider.cs | 14 ++ .../FeatureManagementSettings.cs | 11 ++ ...Abp.FeatureManagement.Domain.Shared.csproj | 14 ++ .../FeatureManagementDomainErrorCodes.cs | 7 + .../FeatureManagementDomainSharedModule.cs | 21 +++ .../Localization/FeatureManagementResource.cs | 10 ++ .../Volo.Abp.FeatureManagement.Domain.csproj | 26 ++++ .../FeatureManagementConsts.cs | 9 ++ .../FeatureManagementDomainModule.cs | 33 +++++ .../Localization/Domain/en.json | 6 + .../Localization/Domain/pt-BR.json | 6 + .../Localization/Domain/zh-Hans.json | 6 + ...atureManagement.EntityFrameworkCore.csproj | 18 +++ .../FeatureManagementDbContext.cs | 35 +++++ ...agementDbContextModelCreatingExtensions.cs | 38 ++++++ ...tureManagementEntityFrameworkCoreModule.cs | 23 ++++ ...agementModelBuilderConfigurationOptions.cs | 18 +++ .../IFeatureManagementDbContext.cs | 13 ++ ...bp.FeatureManagement.HttpApi.Client.csproj | 18 +++ .../FeatureManagementHttpApiClientModule.cs | 22 ++++ .../Volo.Abp.FeatureManagement.HttpApi.csproj | 18 +++ .../FeatureManagementHttpApiModule.cs | 13 ++ .../Volo.Abp.FeatureManagement.MongoDB.csproj | 18 +++ .../FeatureManagementMongoDbContext.cs | 25 ++++ ...atureManagementMongoDbContextExtensions.cs | 20 +++ .../MongoDB/FeatureManagementMongoDbModule.cs | 23 ++++ ...ntMongoModelBuilderConfigurationOptions.cs | 14 ++ .../IFeatureManagementMongoDbContext.cs | 13 ++ .../FeatureManagementMenuContributor.cs | 23 ++++ .../FeatureManagementWebAutoMapperProfile.cs | 12 ++ .../FeatureManagementWebModule.cs | 62 +++++++++ .../Resources/FeatureManagement/en.json | 6 + .../Resources/FeatureManagement/pt-BR.json | 6 + .../Resources/FeatureManagement/zh-Hans.json | 6 + .../FeatureManagement/_ViewImports.cshtml | 4 + .../Properties/launchSettings.json | 27 ++++ .../Volo.Abp.FeatureManagement.Web.csproj | 36 +++++ ...FeatureManagement.Application.Tests.csproj | 19 +++ .../FeatureManagementApplicationTestModule.cs | 13 ++ ....Abp.FeatureManagement.Domain.Tests.csproj | 18 +++ .../FeatureManagementDomainTestBase.cs | 7 + .../FeatureManagementDomainTestModule.cs | 13 ++ ...anagement.EntityFrameworkCore.Tests.csproj | 22 ++++ ...ManagementEntityFrameworkCoreTestModule.cs | 42 ++++++ .../MyEntityRepository_Tests.cs | 7 + .../FeatureManagementMongoDbTestModule.cs | 32 +++++ .../MongoDB/MyEntityRepository_Tests.cs | 7 + ...Abp.FeatureManagement.MongoDB.Tests.csproj | 20 +++ .../FeatureManagementTestBase.cs | 14 ++ .../FeatureManagementTestBaseModule.cs | 37 ++++++ .../FeatureManagementTestData.cs | 8 ++ .../FeatureManagementTestDataBuilder.cs | 24 ++++ .../MyEntityRepository_Tests.cs | 16 +++ ...Volo.Abp.FeatureManagement.TestBase.csproj | 29 +++++ 67 files changed, 1309 insertions(+) create mode 100644 modules/feature-management/Abp.FeatureManagement.sln.DotSettings create mode 100644 modules/feature-management/Volo.Abp.FeatureManagement.sln create mode 100644 modules/feature-management/Volo.Abp.FeatureManagement.sln.DotSettings create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementApplicationContractsModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissionDefinitionProvider.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissions.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/en.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/pt-BR.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/zh-Hans.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationAutoMapperProfile.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettingDefinitionProvider.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettings.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainErrorCodes.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainSharedModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/FeatureManagementResource.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementConsts.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementDomainModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContext.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/IFeatureManagementDbContext.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/FeatureManagementHttpApiClientModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeatureManagementHttpApiModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContext.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/IFeatureManagementMongoDbContext.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementMenuContributor.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebAutoMapperProfile.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebModule.cs create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/en.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/pt-BR.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/_ViewImports.cshtml create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Properties/launchSettings.json create mode 100644 modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureManagementApplicationTestModule.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestBase.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestModule.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreTestModule.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/MyEntityRepository_Tests.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbTestModule.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/MyEntityRepository_Tests.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBase.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBaseModule.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestData.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/MyEntityRepository_Tests.cs create mode 100644 modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj diff --git a/modules/feature-management/Abp.FeatureManagement.sln.DotSettings b/modules/feature-management/Abp.FeatureManagement.sln.DotSettings new file mode 100644 index 0000000000..836e6ed4da --- /dev/null +++ b/modules/feature-management/Abp.FeatureManagement.sln.DotSettings @@ -0,0 +1,7 @@ + + True + D:\github\abp\common.DotSettings + ..\..\..\common.DotSettings + True + 1 + \ No newline at end of file diff --git a/modules/feature-management/Volo.Abp.FeatureManagement.sln b/modules/feature-management/Volo.Abp.FeatureManagement.sln new file mode 100644 index 0000000000..34f0c84aa5 --- /dev/null +++ b/modules/feature-management/Volo.Abp.FeatureManagement.sln @@ -0,0 +1,123 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2026 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.Domain.Shared", "src\Volo.Abp.FeatureManagement.Domain.Shared\Volo.Abp.FeatureManagement.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.Domain", "src\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.Application.Contracts", "src\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.Application", "src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.EntityFrameworkCore", "src\Volo.Abp.FeatureManagement.EntityFrameworkCore\Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.MongoDB", "src\Volo.Abp.FeatureManagement.MongoDB\Volo.Abp.FeatureManagement.MongoDB.csproj", "{F1C58097-4C08-4D88-8976-6B3389391481}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.HttpApi", "src\Volo.Abp.FeatureManagement.HttpApi\Volo.Abp.FeatureManagement.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.HttpApi.Client", "src\Volo.Abp.FeatureManagement.HttpApi.Client\Volo.Abp.FeatureManagement.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.Web", "src\Volo.Abp.FeatureManagement.Web\Volo.Abp.FeatureManagement.Web.csproj", "{8C5B0D35-9734-4439-977C-2F1AC9E1D69E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.TestBase", "test\Volo.Abp.FeatureManagement.TestBase\Volo.Abp.FeatureManagement.TestBase.csproj", "{6E5B22E7-E2DB-45D4-B828-8019D8FD51E8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.Domain.Tests", "test\Volo.Abp.FeatureManagement.Domain.Tests\Volo.Abp.FeatureManagement.Domain.Tests.csproj", "{44FB6636-5427-415D-8883-CB7E42D548F2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests", "test\Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests\Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj", "{E5906DE1-B2F5-472E-BE1B-1D96A68B834D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.MongoDB.Tests", "test\Volo.Abp.FeatureManagement.MongoDB.Tests\Volo.Abp.FeatureManagement.MongoDB.Tests.csproj", "{AA783A34-86E4-41A5-AE21-5D9FBD98D858}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.FeatureManagement.Application.Tests", "test\Volo.Abp.FeatureManagement.Application.Tests\Volo.Abp.FeatureManagement.Application.Tests.csproj", "{13A9EAD6-F3A4-4357-BA4A-A7E8FEB4A264}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1C58097-4C08-4D88-8976-6B3389391481}.Release|Any CPU.Build.0 = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU + {8C5B0D35-9734-4439-977C-2F1AC9E1D69E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C5B0D35-9734-4439-977C-2F1AC9E1D69E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C5B0D35-9734-4439-977C-2F1AC9E1D69E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C5B0D35-9734-4439-977C-2F1AC9E1D69E}.Release|Any CPU.Build.0 = Release|Any CPU + {6E5B22E7-E2DB-45D4-B828-8019D8FD51E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E5B22E7-E2DB-45D4-B828-8019D8FD51E8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E5B22E7-E2DB-45D4-B828-8019D8FD51E8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E5B22E7-E2DB-45D4-B828-8019D8FD51E8}.Release|Any CPU.Build.0 = Release|Any CPU + {44FB6636-5427-415D-8883-CB7E42D548F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44FB6636-5427-415D-8883-CB7E42D548F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44FB6636-5427-415D-8883-CB7E42D548F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44FB6636-5427-415D-8883-CB7E42D548F2}.Release|Any CPU.Build.0 = Release|Any CPU + {E5906DE1-B2F5-472E-BE1B-1D96A68B834D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5906DE1-B2F5-472E-BE1B-1D96A68B834D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5906DE1-B2F5-472E-BE1B-1D96A68B834D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5906DE1-B2F5-472E-BE1B-1D96A68B834D}.Release|Any CPU.Build.0 = Release|Any CPU + {AA783A34-86E4-41A5-AE21-5D9FBD98D858}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AA783A34-86E4-41A5-AE21-5D9FBD98D858}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA783A34-86E4-41A5-AE21-5D9FBD98D858}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AA783A34-86E4-41A5-AE21-5D9FBD98D858}.Release|Any CPU.Build.0 = Release|Any CPU + {13A9EAD6-F3A4-4357-BA4A-A7E8FEB4A264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13A9EAD6-F3A4-4357-BA4A-A7E8FEB4A264}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13A9EAD6-F3A4-4357-BA4A-A7E8FEB4A264}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13A9EAD6-F3A4-4357-BA4A-A7E8FEB4A264}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {F1C58097-4C08-4D88-8976-6B3389391481} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {8C5B0D35-9734-4439-977C-2F1AC9E1D69E} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} + {6E5B22E7-E2DB-45D4-B828-8019D8FD51E8} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {44FB6636-5427-415D-8883-CB7E42D548F2} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {E5906DE1-B2F5-472E-BE1B-1D96A68B834D} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {AA783A34-86E4-41A5-AE21-5D9FBD98D858} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + {13A9EAD6-F3A4-4357-BA4A-A7E8FEB4A264} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} + EndGlobalSection +EndGlobal diff --git a/modules/feature-management/Volo.Abp.FeatureManagement.sln.DotSettings b/modules/feature-management/Volo.Abp.FeatureManagement.sln.DotSettings new file mode 100644 index 0000000000..d4df574aa0 --- /dev/null +++ b/modules/feature-management/Volo.Abp.FeatureManagement.sln.DotSettings @@ -0,0 +1,6 @@ + + True + D:\github\abp\common.DotSettings + ..\..\..\common.DotSettings + True + 1 \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj new file mode 100644 index 0000000000..dacb47aba6 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo.Abp.FeatureManagement.Application.Contracts.csproj @@ -0,0 +1,26 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementApplicationContractsModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementApplicationContractsModule.cs new file mode 100644 index 0000000000..77a446d263 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementApplicationContractsModule.cs @@ -0,0 +1,37 @@ +using Microsoft.Extensions.DependencyInjection; +using Abp.FeatureManagement.Localization; +using Volo.Abp.Application; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(FeatureManagementDomainSharedModule), + typeof(AbpDddApplicationModule) + )] + public class FeatureManagementApplicationContractsModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.DefinitionProviders.Add(); + }); + + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources + .Get() + .AddVirtualJson("/Abp/FeatureManagement/Localization/ApplicationContracts"); + }); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissionDefinitionProvider.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissionDefinitionProvider.cs new file mode 100644 index 0000000000..464f25fe23 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissionDefinitionProvider.cs @@ -0,0 +1,19 @@ +using Abp.FeatureManagement.Localization; +using Volo.Abp.Authorization.Permissions; +using Volo.Abp.Localization; + +namespace Abp.FeatureManagement +{ + public class FeatureManagementPermissionDefinitionProvider : PermissionDefinitionProvider + { + public override void Define(IPermissionDefinitionContext context) + { + //var moduleGroup = context.AddGroup(FeatureManagementPermissions.GroupName, L("Permission:FeatureManagement")); + } + + private static LocalizableString L(string name) + { + return LocalizableString.Create(name); + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissions.cs new file mode 100644 index 0000000000..214cbb3882 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/FeatureManagementPermissions.cs @@ -0,0 +1,15 @@ +namespace Abp.FeatureManagement +{ + public class FeatureManagementPermissions + { + public const string GroupName = "FeatureManagement"; + + public static string[] GetAll() + { + return new[] + { + GroupName + }; + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/en.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/en.json new file mode 100644 index 0000000000..cf27bb4d23 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/en.json @@ -0,0 +1,6 @@ +{ + "culture": "en", + "texts": { + "Permission:FeatureManagement": "FeatureManagement" + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/pt-BR.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/pt-BR.json new file mode 100644 index 0000000000..81d730c60d --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/pt-BR.json @@ -0,0 +1,6 @@ +{ + "culture": "pt-BR", + "texts": { + "Permission:FeatureManagement": "FeatureManagement" + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/zh-Hans.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/zh-Hans.json new file mode 100644 index 0000000000..6e9648b5be --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application.Contracts/Volo/Abp/FeatureManagement/Localization/ApplicationContracts/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + "Permission:FeatureManagement": "FeatureManagement" + } + } \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj new file mode 100644 index 0000000000..38bc1c524a --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo.Abp.FeatureManagement.Application.csproj @@ -0,0 +1,16 @@ + + + + + + netstandard2.0 + + + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationAutoMapperProfile.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationAutoMapperProfile.cs new file mode 100644 index 0000000000..c60a916f09 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationAutoMapperProfile.cs @@ -0,0 +1,12 @@ +using AutoMapper; + +namespace Abp.FeatureManagement +{ + public class FeatureManagementApplicationAutoMapperProfile : Profile + { + public FeatureManagementApplicationAutoMapperProfile() + { + + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationModule.cs new file mode 100644 index 0000000000..7d9db30067 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementApplicationModule.cs @@ -0,0 +1,28 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.AutoMapper; +using Volo.Abp.Modularity; +using Volo.Abp.Settings; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(FeatureManagementDomainModule), + typeof(FeatureManagementApplicationContractsModule), + typeof(AbpAutoMapperModule) + )] + public class FeatureManagementApplicationModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.AddProfile(validate: true); + }); + + Configure(options => + { + options.DefinitionProviders.Add(); + }); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettingDefinitionProvider.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettingDefinitionProvider.cs new file mode 100644 index 0000000000..2efbecd071 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettingDefinitionProvider.cs @@ -0,0 +1,14 @@ +using Volo.Abp.Settings; + +namespace Abp.FeatureManagement +{ + public class FeatureManagementSettingDefinitionProvider : SettingDefinitionProvider + { + public override void Define(ISettingDefinitionContext context) + { + /* Define module settings here. + * Use names from FeatureManagementSettings class. + */ + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettings.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettings.cs new file mode 100644 index 0000000000..5c145b094e --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Application/Volo/Abp/FeatureManagement/FeatureManagementSettings.cs @@ -0,0 +1,11 @@ +namespace Abp.FeatureManagement +{ + public static class FeatureManagementSettings + { + public const string GroupName = "FeatureManagement"; + + /* Add constants for setting names. Example: + * public const string MySettingName = GroupName + ".MySettingName"; + */ + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj new file mode 100644 index 0000000000..aca714914e --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj @@ -0,0 +1,14 @@ + + + + + + netstandard2.0 + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainErrorCodes.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainErrorCodes.cs new file mode 100644 index 0000000000..a9a1c9765e --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainErrorCodes.cs @@ -0,0 +1,7 @@ +namespace Abp.FeatureManagement +{ + public static class FeatureManagementDomainErrorCodes + { + //Add your business exception error codes here... + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainSharedModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainSharedModule.cs new file mode 100644 index 0000000000..676c93904e --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureManagementDomainSharedModule.cs @@ -0,0 +1,21 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.Localization; +using Abp.FeatureManagement.Localization; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(AbpLocalizationModule) + )] + public class FeatureManagementDomainSharedModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.Resources.Add("en"); + }); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/FeatureManagementResource.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/FeatureManagementResource.cs new file mode 100644 index 0000000000..eb756346bb --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/FeatureManagementResource.cs @@ -0,0 +1,10 @@ +using Volo.Abp.Localization; + +namespace Abp.FeatureManagement.Localization +{ + [LocalizationResourceName("FeatureManagement")] + public class FeatureManagementResource + { + + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj new file mode 100644 index 0000000000..2b4d94f9da --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj @@ -0,0 +1,26 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementConsts.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementConsts.cs new file mode 100644 index 0000000000..18f4c3d4db --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementConsts.cs @@ -0,0 +1,9 @@ +namespace Abp.FeatureManagement +{ + public static class FeatureManagementConsts + { + public const string DefaultDbTablePrefix = "FeatureManagement"; + + public const string DefaultDbSchema = null; + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementDomainModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementDomainModule.cs new file mode 100644 index 0000000000..0c5ae89c3d --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/FeatureManagementDomainModule.cs @@ -0,0 +1,33 @@ +using Microsoft.Extensions.DependencyInjection; +using Abp.FeatureManagement.Localization; +using Volo.Abp.Localization; +using Volo.Abp.Localization.ExceptionHandling; +using Volo.Abp.Modularity; +using Volo.Abp.VirtualFileSystem; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(FeatureManagementDomainSharedModule) + )] + public class FeatureManagementDomainModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + + Configure(options => + { + options.Resources.Get().AddVirtualJson("/Abp/FeatureManagement/Localization/Domain"); + }); + + Configure(options => + { + options.MapCodeNamespace("FeatureManagement", typeof(FeatureManagementResource)); + }); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json new file mode 100644 index 0000000000..92e4e9582b --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/en.json @@ -0,0 +1,6 @@ +{ + "culture": "en", + "texts": { + + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json new file mode 100644 index 0000000000..6d746df04c --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/pt-BR.json @@ -0,0 +1,6 @@ +{ + "culture": "pt-BR", + "texts": { + + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json new file mode 100644 index 0000000000..e4557f0ad2 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/Localization/Domain/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + + } + } \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj new file mode 100644 index 0000000000..303f2af6b5 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj @@ -0,0 +1,18 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContext.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContext.cs new file mode 100644 index 0000000000..33b7ff73ce --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContext.cs @@ -0,0 +1,35 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Abp.FeatureManagement.EntityFrameworkCore +{ + [ConnectionStringName("FeatureManagement")] + public class FeatureManagementDbContext : AbpDbContext, IFeatureManagementDbContext + { + public static string TablePrefix { get; set; } = FeatureManagementConsts.DefaultDbTablePrefix; + + public static string Schema { get; set; } = FeatureManagementConsts.DefaultDbSchema; + + /* Add DbSet for each Aggregate Root here. Example: + * public DbSet Questions { get; set; } + */ + + public FeatureManagementDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder builder) + { + base.OnModelCreating(builder); + + builder.ConfigureFeatureManagement(options => + { + options.TablePrefix = TablePrefix; + options.Schema = Schema; + }); + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs new file mode 100644 index 0000000000..fd2e4f1c6c --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs @@ -0,0 +1,38 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Volo.Abp; + +namespace Abp.FeatureManagement.EntityFrameworkCore +{ + public static class FeatureManagementDbContextModelCreatingExtensions + { + public static void ConfigureFeatureManagement( + this ModelBuilder builder, + Action optionsAction = null) + { + Check.NotNull(builder, nameof(builder)); + + var options = new FeatureManagementModelBuilderConfigurationOptions(); + + optionsAction?.Invoke(options); + + /* Configure all entities here. Example: + + builder.Entity(b => + { + //Configure table & schema name + //b.ToTable(options.TablePrefix + "Questions", options.Schema); + + //Properties + //b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength); + + //Configure relations + //b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId); + + //Configure indexes + //b.HasIndex(q => q.CreationTime); + }); + */ + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreModule.cs new file mode 100644 index 0000000000..fee7b04ce8 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreModule.cs @@ -0,0 +1,23 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement.EntityFrameworkCore +{ + [DependsOn( + typeof(FeatureManagementDomainModule), + typeof(AbpEntityFrameworkCoreModule) + )] + public class FeatureManagementEntityFrameworkCoreModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAbpDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs new file mode 100644 index 0000000000..f3dd6311d4 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementModelBuilderConfigurationOptions.cs @@ -0,0 +1,18 @@ +using JetBrains.Annotations; +using Volo.Abp.EntityFrameworkCore.Modeling; + +namespace Abp.FeatureManagement.EntityFrameworkCore +{ + public class FeatureManagementModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions + { + public FeatureManagementModelBuilderConfigurationOptions( + [NotNull] string tablePrefix = FeatureManagementConsts.DefaultDbTablePrefix, + [CanBeNull] string schema = FeatureManagementConsts.DefaultDbSchema) + : base( + tablePrefix, + schema) + { + + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/IFeatureManagementDbContext.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/IFeatureManagementDbContext.cs new file mode 100644 index 0000000000..86e6f1155a --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/IFeatureManagementDbContext.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Data; +using Volo.Abp.EntityFrameworkCore; + +namespace Abp.FeatureManagement.EntityFrameworkCore +{ + [ConnectionStringName("FeatureManagement")] + public interface IFeatureManagementDbContext : IEfCoreDbContext + { + /* Add DbSet for each Aggregate Root here. Example: + * DbSet Questions { get; } + */ + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj new file mode 100644 index 0000000000..b604717ee0 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj @@ -0,0 +1,18 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/FeatureManagementHttpApiClientModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/FeatureManagementHttpApiClientModule.cs new file mode 100644 index 0000000000..890e72e1d1 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo/Abp/FeatureManagement/FeatureManagementHttpApiClientModule.cs @@ -0,0 +1,22 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(FeatureManagementApplicationContractsModule), + typeof(AbpHttpClientModule))] + public class FeatureManagementHttpApiClientModule : AbpModule + { + public const string RemoteServiceName = "FeatureManagement"; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies( + typeof(FeatureManagementApplicationContractsModule).Assembly, + RemoteServiceName + ); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj new file mode 100644 index 0000000000..5a62a8587b --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj @@ -0,0 +1,18 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeatureManagementHttpApiModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeatureManagementHttpApiModule.cs new file mode 100644 index 0000000000..f808e207ba --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo/Abp/FeatureManagement/FeatureManagementHttpApiModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.AspNetCore.Mvc; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(FeatureManagementApplicationContractsModule), + typeof(AbpAspNetCoreMvcModule))] + public class FeatureManagementHttpApiModule : AbpModule + { + + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj new file mode 100644 index 0000000000..5a17f69af1 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj @@ -0,0 +1,18 @@ + + + + + + netstandard2.0 + + + + + + + + + + + + diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContext.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContext.cs new file mode 100644 index 0000000000..e7421c5d4e --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContext.cs @@ -0,0 +1,25 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace Abp.FeatureManagement.MongoDB +{ + [ConnectionStringName("FeatureManagement")] + public class FeatureManagementMongoDbContext : AbpMongoDbContext, IFeatureManagementMongoDbContext + { + public static string CollectionPrefix { get; set; } = FeatureManagementConsts.DefaultDbTablePrefix; + + /* Add mongo collections here. Example: + * public IMongoCollection Questions => Collection(); + */ + + protected override void CreateModel(IMongoModelBuilder modelBuilder) + { + base.CreateModel(modelBuilder); + + modelBuilder.ConfigureFeatureManagement(options => + { + options.CollectionPrefix = CollectionPrefix; + }); + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs new file mode 100644 index 0000000000..90b9ec793c --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbContextExtensions.cs @@ -0,0 +1,20 @@ +using System; +using Volo.Abp; +using Volo.Abp.MongoDB; + +namespace Abp.FeatureManagement.MongoDB +{ + public static class FeatureManagementMongoDbContextExtensions + { + public static void ConfigureFeatureManagement( + this IMongoModelBuilder builder, + Action optionsAction = null) + { + Check.NotNull(builder, nameof(builder)); + + var options = new FeatureManagementMongoModelBuilderConfigurationOptions(); + + optionsAction?.Invoke(options); + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbModule.cs new file mode 100644 index 0000000000..b6b06379b8 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbModule.cs @@ -0,0 +1,23 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.Modularity; +using Volo.Abp.MongoDB; + +namespace Abp.FeatureManagement.MongoDB +{ + [DependsOn( + typeof(FeatureManagementDomainModule), + typeof(AbpMongoDbModule) + )] + public class FeatureManagementMongoDbModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddMongoDbContext(options => + { + /* Add custom repositories here. Example: + * options.AddRepository(); + */ + }); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs new file mode 100644 index 0000000000..65f4f6c64d --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/FeatureManagementMongoModelBuilderConfigurationOptions.cs @@ -0,0 +1,14 @@ +using JetBrains.Annotations; +using Volo.Abp.MongoDB; + +namespace Abp.FeatureManagement.MongoDB +{ + public class FeatureManagementMongoModelBuilderConfigurationOptions : MongoModelBuilderConfigurationOptions + { + public FeatureManagementMongoModelBuilderConfigurationOptions( + [NotNull] string tablePrefix = FeatureManagementConsts.DefaultDbTablePrefix) + : base(tablePrefix) + { + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/IFeatureManagementMongoDbContext.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/IFeatureManagementMongoDbContext.cs new file mode 100644 index 0000000000..125bcabc7c --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo/Abp/FeatureManagement/MongoDB/IFeatureManagementMongoDbContext.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Data; +using Volo.Abp.MongoDB; + +namespace Abp.FeatureManagement.MongoDB +{ + [ConnectionStringName("FeatureManagement")] + public interface IFeatureManagementMongoDbContext : IAbpMongoDbContext + { + /* Define mongo collections here. Example: + * IMongoCollection Questions { get; } + */ + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementMenuContributor.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementMenuContributor.cs new file mode 100644 index 0000000000..88721c9c54 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementMenuContributor.cs @@ -0,0 +1,23 @@ +using System.Threading.Tasks; +using Volo.Abp.UI.Navigation; + +namespace Abp.FeatureManagement +{ + public class FeatureManagementMenuContributor : 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/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebAutoMapperProfile.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebAutoMapperProfile.cs new file mode 100644 index 0000000000..dc6c8bb32e --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebAutoMapperProfile.cs @@ -0,0 +1,12 @@ +using AutoMapper; + +namespace Abp.FeatureManagement +{ + public class FeatureManagementWebAutoMapperProfile : Profile + { + public FeatureManagementWebAutoMapperProfile() + { + //Create mappings. + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebModule.cs new file mode 100644 index 0000000000..1c683180e2 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/FeatureManagementWebModule.cs @@ -0,0 +1,62 @@ +using Localization.Resources.AbpUi; +using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.Extensions.DependencyInjection; +using Abp.FeatureManagement.Localization; +using Volo.Abp.AspNetCore.Mvc.Localization; +using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; +using Volo.Abp.AutoMapper; +using Volo.Abp.Localization; +using Volo.Abp.Localization.Resources.AbpValidation; +using Volo.Abp.Modularity; +using Volo.Abp.UI.Navigation; +using Volo.Abp.VirtualFileSystem; + +namespace Abp.FeatureManagement +{ + [DependsOn(typeof(FeatureManagementHttpApiModule))] + [DependsOn(typeof(AbpAspNetCoreMvcUiThemeSharedModule))] + [DependsOn(typeof(AbpAutoMapperModule))] + public class FeatureManagementWebModule : AbpModule + { + public override void PreConfigureServices(ServiceConfigurationContext context) + { + context.Services.PreConfigure(options => + { + options.AddAssemblyResource(typeof(FeatureManagementResource), typeof(FeatureManagementWebModule).Assembly); + }); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.MenuContributors.Add(new FeatureManagementMenuContributor()); + }); + + Configure(options => + { + options.FileSets.AddEmbedded("Abp.FeatureManagement"); + }); + + Configure(options => + { + options.Resources + .Get() + .AddBaseTypes( + typeof(AbpValidationResource), + typeof(AbpUiResource) + ).AddVirtualJson("/Localization/Resources/FeatureManagement"); + }); + + Configure(options => + { + options.AddProfile(validate: true); + }); + + Configure(options => + { + //Configure authorization. + }); + } + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/en.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/en.json new file mode 100644 index 0000000000..92e4e9582b --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/en.json @@ -0,0 +1,6 @@ +{ + "culture": "en", + "texts": { + + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/pt-BR.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/pt-BR.json new file mode 100644 index 0000000000..6d746df04c --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/pt-BR.json @@ -0,0 +1,6 @@ +{ + "culture": "pt-BR", + "texts": { + + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json new file mode 100644 index 0000000000..e4557f0ad2 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Localization/Resources/FeatureManagement/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "culture": "zh-Hans", + "texts": { + + } + } \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/_ViewImports.cshtml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/_ViewImports.cshtml new file mode 100644 index 0000000000..c1da1f5f10 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/_ViewImports.cshtml @@ -0,0 +1,4 @@ +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap +@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Properties/launchSettings.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Properties/launchSettings.json new file mode 100644 index 0000000000..23a4efbb61 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:56993/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Abp.FeatureManagement.Web": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:56994/" + } + } +} \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj new file mode 100644 index 0000000000..7d25291808 --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj @@ -0,0 +1,36 @@ + + + + + + netstandard2.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + true + Library + Volo.Abp.FeatureManagement + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj new file mode 100644 index 0000000000..1c41a820e6 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj @@ -0,0 +1,19 @@ + + + + + + netcoreapp2.2 + + + + + + + + + + + + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureManagementApplicationTestModule.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureManagementApplicationTestModule.cs new file mode 100644 index 0000000000..3b5bbdab1e --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo/Abp/FeatureManagement/FeatureManagementApplicationTestModule.cs @@ -0,0 +1,13 @@ +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(FeatureManagementApplicationModule), + typeof(FeatureManagementDomainTestModule) + )] + public class FeatureManagementApplicationTestModule : AbpModule + { + + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj new file mode 100644 index 0000000000..242262f35e --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj @@ -0,0 +1,18 @@ + + + + + + netcoreapp2.2 + + + + + + + + + + + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestBase.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestBase.cs new file mode 100644 index 0000000000..5018c616f8 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestBase.cs @@ -0,0 +1,7 @@ +namespace Abp.FeatureManagement +{ + public abstract class FeatureManagementDomainTestBase : FeatureManagementTestBase + { + + } +} \ No newline at end of file diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestModule.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestModule.cs new file mode 100644 index 0000000000..2cd695ab95 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureManagementDomainTestModule.cs @@ -0,0 +1,13 @@ +using Abp.FeatureManagement.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(FeatureManagementEntityFrameworkCoreTestModule) + )] + public class FeatureManagementDomainTestModule : AbpModule + { + + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj new file mode 100644 index 0000000000..27d7612baa --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj @@ -0,0 +1,22 @@ + + + + + + netcoreapp2.2 + + + + + + + + + + + + + + + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreTestModule.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreTestModule.cs new file mode 100644 index 0000000000..7aed23f6f1 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementEntityFrameworkCoreTestModule.cs @@ -0,0 +1,42 @@ +using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.EntityFrameworkCore; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement.EntityFrameworkCore +{ + [DependsOn( + typeof(FeatureManagementTestBaseModule), + typeof(FeatureManagementEntityFrameworkCoreModule) + )] + public class FeatureManagementEntityFrameworkCoreTestModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var sqliteConnection = CreateDatabaseAndGetConnection(); + + Configure(options => + { + options.Configure(abpDbContextConfigurationContext => + { + abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection); + }); + }); + } + + private static SqliteConnection CreateDatabaseAndGetConnection() + { + var connection = new SqliteConnection("Data Source=:memory:"); + connection.Open(); + + new FeatureManagementDbContext( + new DbContextOptionsBuilder().UseSqlite(connection).Options + ).GetService().CreateTables(); + + return connection; + } + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/MyEntityRepository_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/MyEntityRepository_Tests.cs new file mode 100644 index 0000000000..8ec867978a --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo/Abp/FeatureManagement/EntityFrameworkCore/MyEntityRepository_Tests.cs @@ -0,0 +1,7 @@ +namespace Abp.FeatureManagement.EntityFrameworkCore +{ + public class MyEntityRepository_Tests : MyEntityRepository_Tests + { + + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbTestModule.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbTestModule.cs new file mode 100644 index 0000000000..1bace3e3ad --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/FeatureManagementMongoDbTestModule.cs @@ -0,0 +1,32 @@ +using Microsoft.Extensions.DependencyInjection; +using Mongo2Go; +using Volo.Abp; +using Volo.Abp.Data; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement.MongoDB +{ + [DependsOn( + typeof(FeatureManagementTestBaseModule), + typeof(FeatureManagementMongoDbModule) + )] + public class FeatureManagementMongoDbTestModule : AbpModule + { + private MongoDbRunner _mongoDbRunner; + + public override void ConfigureServices(ServiceConfigurationContext context) + { + _mongoDbRunner = MongoDbRunner.Start(); + + Configure(options => + { + options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString; + }); + } + + public override void OnApplicationShutdown(ApplicationShutdownContext context) + { + _mongoDbRunner.Dispose(); + } + } +} \ No newline at end of file diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/MyEntityRepository_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/MyEntityRepository_Tests.cs new file mode 100644 index 0000000000..e8c2483b00 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Abp/FeatureManagement/MongoDB/MyEntityRepository_Tests.cs @@ -0,0 +1,7 @@ +namespace Abp.FeatureManagement.MongoDB +{ + public class MyEntityRepository_Tests : MyEntityRepository_Tests + { + + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj new file mode 100644 index 0000000000..8bed0f0aa9 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj @@ -0,0 +1,20 @@ + + + + + + netcoreapp2.2 + + + + + + + + + + + + + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBase.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBase.cs new file mode 100644 index 0000000000..c13001f96a --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBase.cs @@ -0,0 +1,14 @@ +using Volo.Abp; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement +{ + public abstract class FeatureManagementTestBase : AbpIntegratedTest + where TStartupModule : IAbpModule + { + protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) + { + options.UseAutofac(); + } + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBaseModule.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBaseModule.cs new file mode 100644 index 0000000000..f6f77ea990 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestBaseModule.cs @@ -0,0 +1,37 @@ +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp; +using Volo.Abp.Authorization; +using Volo.Abp.Autofac; +using Volo.Abp.Modularity; + +namespace Abp.FeatureManagement +{ + [DependsOn( + typeof(AbpAutofacModule), + typeof(AbpTestBaseModule), + typeof(AbpAuthorizationModule), + typeof(FeatureManagementDomainModule) + )] + public class FeatureManagementTestBaseModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddAlwaysAllowAuthorization(); + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + SeedTestData(context); + } + + private static void SeedTestData(ApplicationInitializationContext context) + { + using (var scope = context.ServiceProvider.CreateScope()) + { + scope.ServiceProvider + .GetRequiredService() + .Build(); + } + } + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestData.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestData.cs new file mode 100644 index 0000000000..72a230ec30 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestData.cs @@ -0,0 +1,8 @@ +using Volo.Abp.DependencyInjection; + +namespace Abp.FeatureManagement +{ + public class FeatureManagementTestData : ISingletonDependency + { + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs new file mode 100644 index 0000000000..d6da7b6ab0 --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/FeatureManagementTestDataBuilder.cs @@ -0,0 +1,24 @@ +using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; + +namespace Abp.FeatureManagement +{ + public class FeatureManagementTestDataBuilder : ITransientDependency + { + private readonly IGuidGenerator _guidGenerator; + private FeatureManagementTestData _testData; + + public FeatureManagementTestDataBuilder( + IGuidGenerator guidGenerator, + FeatureManagementTestData testData) + { + _guidGenerator = guidGenerator; + _testData = testData; + } + + public void Build() + { + + } + } +} \ No newline at end of file diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/MyEntityRepository_Tests.cs b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/MyEntityRepository_Tests.cs new file mode 100644 index 0000000000..67b7f258ec --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Abp/FeatureManagement/MyEntityRepository_Tests.cs @@ -0,0 +1,16 @@ +using System.Threading.Tasks; +using Volo.Abp.Modularity; +using Xunit; + +namespace Abp.FeatureManagement +{ + public abstract class MyEntityRepository_Tests : FeatureManagementTestBase + where TStartupModule : IAbpModule + { + [Fact] + public async Task Test1() + { + + } + } +} diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj new file mode 100644 index 0000000000..2b3d64386d --- /dev/null +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj @@ -0,0 +1,29 @@ + + + + + + netcoreapp2.2 + + + + + + + + + + + + + + + + + + + + + + +