#851 Added empty feature management module.

pull/870/head
Halil ibrahim Kalkan 6 years ago
parent 85d6a65fd0
commit db1d09f68d

@ -0,0 +1,7 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A9046795AF04F2428C81EEAFEDBD18EE/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A9046795AF04F2428C81EEAFEDBD18EE/AbsolutePath/@EntryValue">D:\github\abp\common.DotSettings</s:String>
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A9046795AF04F2428C81EEAFEDBD18EE/RelativePath/@EntryValue">..\..\..\common.DotSettings</s:String>
<s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=FileA9046795AF04F2428C81EEAFEDBD18EE/@KeyIndexDefined">True</s:Boolean>
<s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=FileA9046795AF04F2428C81EEAFEDBD18EE/RelativePriority/@EntryValue">1</s:Double>
</wpf:ResourceDictionary>

@ -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

@ -0,0 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A9046795AF04F2428C81EEAFEDBD18EE/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A9046795AF04F2428C81EEAFEDBD18EE/AbsolutePath/@EntryValue">D:\github\abp\common.DotSettings</s:String>
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=A9046795AF04F2428C81EEAFEDBD18EE/RelativePath/@EntryValue">..\..\..\common.DotSettings</s:String>
<s:Boolean x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=FileA9046795AF04F2428C81EEAFEDBD18EE/@KeyIndexDefined">True</s:Boolean>
<s:Double x:Key="/Default/Environment/InjectedLayers/InjectedLayerCustomization/=FileA9046795AF04F2428C81EEAFEDBD18EE/RelativePriority/@EntryValue">1</s:Double></wpf:ResourceDictionary>

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.Ddd.Application.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Volo\Abp\FeatureManagement\Localization\ApplicationContracts\*.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="Volo\Abp\FeatureManagement\Localization\ApplicationContracts\*.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Domain.Shared\Volo.Abp.FeatureManagement.Domain.Shared.csproj" />
</ItemGroup>
</Project>

@ -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<PermissionOptions>(options =>
{
options.DefinitionProviders.Add<FeatureManagementPermissionDefinitionProvider>();
});
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<FeatureManagementApplicationContractsModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<FeatureManagementResource>()
.AddVirtualJson("/Abp/FeatureManagement/Localization/ApplicationContracts");
});
}
}
}

@ -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<FeatureManagementResource>(name);
}
}
}

@ -0,0 +1,15 @@
namespace Abp.FeatureManagement
{
public class FeatureManagementPermissions
{
public const string GroupName = "FeatureManagement";
public static string[] GetAll()
{
return new[]
{
GroupName
};
}
}
}

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.AutoMapper.csproj" />
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,12 @@
using AutoMapper;
namespace Abp.FeatureManagement
{
public class FeatureManagementApplicationAutoMapperProfile : Profile
{
public FeatureManagementApplicationAutoMapperProfile()
{
}
}
}

@ -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<AbpAutoMapperOptions>(options =>
{
options.AddProfile<FeatureManagementApplicationAutoMapperProfile>(validate: true);
});
Configure<SettingOptions>(options =>
{
options.DefinitionProviders.Add<FeatureManagementSettingDefinitionProvider>();
});
}
}
}

@ -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.
*/
}
}
}

@ -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";
*/
}
}

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.Localization.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,7 @@
namespace Abp.FeatureManagement
{
public static class FeatureManagementDomainErrorCodes
{
//Add your business exception error codes here...
}
}

@ -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<AbpLocalizationOptions>(options =>
{
options.Resources.Add<FeatureManagementResource>("en");
});
}
}
}

@ -0,0 +1,10 @@
using Volo.Abp.Localization;
namespace Abp.FeatureManagement.Localization
{
[LocalizationResourceName("FeatureManagement")]
public class FeatureManagementResource
{
}
}

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.Ddd.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Volo\Abp\FeatureManagement\Localization\Domain\*.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="Volo\Abp\FeatureManagement\Localization\Domain\*.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Domain.Shared\Volo.Abp.FeatureManagement.Domain.Shared.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,9 @@
namespace Abp.FeatureManagement
{
public static class FeatureManagementConsts
{
public const string DefaultDbTablePrefix = "FeatureManagement";
public const string DefaultDbSchema = null;
}
}

@ -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<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<FeatureManagementDomainModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources.Get<FeatureManagementResource>().AddVirtualJson("/Abp/FeatureManagement/Localization/Domain");
});
Configure<ExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("FeatureManagement", typeof(FeatureManagementResource));
});
}
}
}

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" />
</ItemGroup>
</Project>

@ -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<FeatureManagementDbContext>, 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<Question> Questions { get; set; }
*/
public FeatureManagementDbContext(DbContextOptions<FeatureManagementDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.ConfigureFeatureManagement(options =>
{
options.TablePrefix = TablePrefix;
options.Schema = Schema;
});
}
}
}

@ -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<FeatureManagementModelBuilderConfigurationOptions> optionsAction = null)
{
Check.NotNull(builder, nameof(builder));
var options = new FeatureManagementModelBuilderConfigurationOptions();
optionsAction?.Invoke(options);
/* Configure all entities here. Example:
builder.Entity<Question>(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);
});
*/
}
}
}

@ -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<FeatureManagementDbContext>(options =>
{
/* Add custom repositories here. Example:
* options.AddRepository<Question, EfCoreQuestionRepository>();
*/
});
}
}
}

@ -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)
{
}
}
}

@ -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<Question> Questions { get; }
*/
}
}

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.Http.Client.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj" />
</ItemGroup>
</Project>

@ -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
);
}
}
}

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.AspNetCore.Mvc.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj" />
</ItemGroup>
</Project>

@ -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
{
}
}

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.MongoDB.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" />
</ItemGroup>
</Project>

@ -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<Question> Questions => Collection<Question>();
*/
protected override void CreateModel(IMongoModelBuilder modelBuilder)
{
base.CreateModel(modelBuilder);
modelBuilder.ConfigureFeatureManagement(options =>
{
options.CollectionPrefix = CollectionPrefix;
});
}
}
}

@ -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<MongoModelBuilderConfigurationOptions> optionsAction = null)
{
Check.NotNull(builder, nameof(builder));
var options = new FeatureManagementMongoModelBuilderConfigurationOptions();
optionsAction?.Invoke(options);
}
}
}

@ -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<FeatureManagementMongoDbContext>(options =>
{
/* Add custom repositories here. Example:
* options.AddRepository<Question, MongoQuestionRepository>();
*/
});
}
}
}

@ -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)
{
}
}
}

@ -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<Question> Questions { get; }
*/
}
}

@ -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;
}
}
}

@ -0,0 +1,12 @@
using AutoMapper;
namespace Abp.FeatureManagement
{
public class FeatureManagementWebAutoMapperProfile : Profile
{
public FeatureManagementWebAutoMapperProfile()
{
//Create mappings.
}
}
}

@ -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<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(typeof(FeatureManagementResource), typeof(FeatureManagementWebModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<NavigationOptions>(options =>
{
options.MenuContributors.Add(new FeatureManagementMenuContributor());
});
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<FeatureManagementWebModule>("Abp.FeatureManagement");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<FeatureManagementResource>()
.AddBaseTypes(
typeof(AbpValidationResource),
typeof(AbpUiResource)
).AddVirtualJson("/Localization/Resources/FeatureManagement");
});
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<FeatureManagementWebAutoMapperProfile>(validate: true);
});
Configure<RazorPagesOptions>(options =>
{
//Configure authorization.
});
}
}
}

@ -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

@ -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/"
}
}
}

@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<IsPackable>true</IsPackable>
<OutputType>Library</OutputType>
<RootNamespace>Volo.Abp.FeatureManagement</RootNamespace>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="wwwroot\**\*.*" />
<EmbeddedResource Include="Pages\**\*.cshtml" Exclude="*.cs" />
<EmbeddedResource Include="Localization\Resources\**\*.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="wwwroot\**\*.*" />
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Localization\Resources\**\*.json" />
<Content Remove="Properties\launchSettings.json" />
<None Include="Properties\launchSettings.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.AutoMapper.csproj" />
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.HttpApi\Volo.Abp.FeatureManagement.HttpApi.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj" />
<ProjectReference Include="..\Volo.Abp.FeatureManagement.Domain.Tests\Volo.Abp.FeatureManagement.Domain.Tests.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
</ItemGroup>
</Project>

@ -0,0 +1,13 @@
using Volo.Abp.Modularity;
namespace Abp.FeatureManagement
{
[DependsOn(
typeof(FeatureManagementApplicationModule),
typeof(FeatureManagementDomainTestModule)
)]
public class FeatureManagementApplicationTestModule : AbpModule
{
}
}

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests\Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,7 @@
namespace Abp.FeatureManagement
{
public abstract class FeatureManagementDomainTestBase : FeatureManagementTestBase<FeatureManagementDomainTestModule>
{
}
}

@ -0,0 +1,13 @@
using Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace Abp.FeatureManagement
{
[DependsOn(
typeof(FeatureManagementEntityFrameworkCoreTestModule)
)]
public class FeatureManagementDomainTestModule : AbpModule
{
}
}

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.FeatureManagement.EntityFrameworkCore\Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\Volo.Abp.FeatureManagement.TestBase\Volo.Abp.FeatureManagement.TestBase.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.0" />
</ItemGroup>
</Project>

@ -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<AbpDbContextOptions>(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<FeatureManagementDbContext>().UseSqlite(connection).Options
).GetService<IRelationalDatabaseCreator>().CreateTables();
return connection;
}
}
}

@ -0,0 +1,7 @@
namespace Abp.FeatureManagement.EntityFrameworkCore
{
public class MyEntityRepository_Tests : MyEntityRepository_Tests<FeatureManagementEntityFrameworkCoreTestModule>
{
}
}

@ -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<DbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = _mongoDbRunner.ConnectionString;
});
}
public override void OnApplicationShutdown(ApplicationShutdownContext context)
{
_mongoDbRunner.Dispose();
}
}
}

@ -0,0 +1,7 @@
namespace Abp.FeatureManagement.MongoDB
{
public class MyEntityRepository_Tests : MyEntityRepository_Tests<FeatureManagementMongoDbTestModule>
{
}
}

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.FeatureManagement.MongoDB\Volo.Abp.FeatureManagement.MongoDB.csproj" />
<ProjectReference Include="..\Volo.Abp.FeatureManagement.TestBase\Volo.Abp.FeatureManagement.TestBase.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Mongo2Go" Version="2.2.8" />
</ItemGroup>
</Project>

@ -0,0 +1,14 @@
using Volo.Abp;
using Volo.Abp.Modularity;
namespace Abp.FeatureManagement
{
public abstract class FeatureManagementTestBase<TStartupModule> : AbpIntegratedTest<TStartupModule>
where TStartupModule : IAbpModule
{
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{
options.UseAutofac();
}
}
}

@ -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<FeatureManagementTestDataBuilder>()
.Build();
}
}
}
}

@ -0,0 +1,8 @@
using Volo.Abp.DependencyInjection;
namespace Abp.FeatureManagement
{
public class FeatureManagementTestData : ISingletonDependency
{
}
}

@ -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()
{
}
}
}

@ -0,0 +1,16 @@
using System.Threading.Tasks;
using Volo.Abp.Modularity;
using Xunit;
namespace Abp.FeatureManagement
{
public abstract class MyEntityRepository_Tests<TStartupModule> : FeatureManagementTestBase<TStartupModule>
where TStartupModule : IAbpModule
{
[Fact]
public async Task Test1()
{
}
}
}

@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.Authorization.csproj" />
<ProjectReference Include="..\..\..\..\framework\Volo.Abp.TestBase.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" />
</ItemGroup>
</Project>
Loading…
Cancel
Save