From c7c94e5a6a89a6fbc2eec9ff2c5265e07a9cebdc Mon Sep 17 00:00:00 2001 From: cKey <35512826+colinin@users.noreply.github.com> Date: Thu, 13 May 2021 08:52:57 +0800 Subject: [PATCH] Remove invalid items --- aspnet-core/LINGYUN.MicroService.All.sln | 45 +++++----- .../AbpNRulesModule.cs | 31 ------- .../LINGYUN.Abp.Rules.NRules.csproj | 22 ----- .../LINGYUN/Abp/Rules/AbpNRulesOptions.cs | 14 --- .../LINGYUN/Abp/Rules/AbpRuleRepository.cs | 44 --------- .../LINGYUN/Abp/Rules/DependencyResolver.cs | 20 ----- .../LINGYUN/Abp/Rules/INRulesRepository.cs | 20 ----- .../Abp/Rules/NRulesEntityRuleContributor.cs | 60 ------------- .../LINGYUN/Abp/Rules/RuleActivator.cs | 24 ----- .../NRulesServiceCollectionExtensions.cs | 55 ------------ .../NRules/RuleRepositoryExtensions.cs | 15 ---- .../LINGYUN.Abp.Rules.csproj | 14 --- .../LINGYUN/Abp/Rules/AbpRulesModule.cs | 16 ---- .../Rules/EntityChangedRulesInterceptor.cs | 48 ---------- .../EntityChangedRulesInterceptorRegistrar.cs | 28 ------ .../LINGYUN/Abp/Rules/EntityRuleContext.cs | 18 ---- .../LINGYUN/Abp/Rules/ErrorType.cs | 8 -- .../LINGYUN/Abp/Rules/ExpressionType.cs | 7 -- .../Abp/Rules/IEntityRuleContributor.cs | 9 -- .../LINGYUN/Abp/Rules/INeedRule.cs | 6 -- .../LINGYUN/Abp/Rules/IRuleFinder.cs | 11 --- .../Abp/Rules/NullEntityRuleContributor.cs | 13 --- .../LINGYUN/Abp/Rules/NullRuleFinder.cs | 15 ---- .../LINGYUN/Abp/Rules/Rule.cs | 90 ------------------- .../LINGYUN/Abp/Rules/RuleGroup.cs | 53 ----------- .../LINGYUN/Abp/Rules/RuleNameAttribute.cs | 35 -------- .../LINGYUN/Abp/Rules/RuleParam.cs | 45 ---------- .../common/LINGYUN.Abp.Rules/README.md | 7 -- ...N.Abp.Dapr.Actors.IdentityModel.Web.csproj | 20 ----- ....Dapr.Actors.IdentityModel.Web.csproj.user | 6 -- .../AbpDaprActorsIdentityModelWebModule.cs | 10 --- ...dentityModelDaprActorProxyAuthenticator.cs | 51 ----------- .../Properties/launchSettings.json | 27 ------ .../README.md | 19 ---- ...NGYUN.Abp.Dapr.Actors.IdentityModel.csproj | 18 ---- .../DaprActorConfigurationExtensions.cs | 54 ----------- .../AbpDaprActorsIdentityModelModule.cs | 13 --- ...dentityModelDaprActorProxyAuthenticator.cs | 66 -------------- .../README.md | 19 ---- .../Localization/Xml/XmlLocalizationFile.cs | 2 +- ...LINGYUN.Abp.Localization.Json.Tests.csproj | 1 - 41 files changed, 25 insertions(+), 1054 deletions(-) delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/AbpNRulesModule.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN.Abp.Rules.NRules.csproj delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpNRulesOptions.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpRuleRepository.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/DependencyResolver.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/INRulesRepository.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/NRulesEntityRuleContributor.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/RuleActivator.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/Microsoft/Extensions/DependencyInjection/NRulesServiceCollectionExtensions.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/NRules/RuleRepositoryExtensions.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN.Abp.Rules.csproj delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/AbpRulesModule.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptor.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptorRegistrar.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityRuleContext.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ErrorType.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ExpressionType.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IEntityRuleContributor.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/INeedRule.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IRuleFinder.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullEntityRuleContributor.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullRuleFinder.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/Rule.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleGroup.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleNameAttribute.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleParam.cs delete mode 100644 aspnet-core/modules/common/LINGYUN.Abp.Rules/README.md delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj.user delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/AbpDaprActorsIdentityModelWebModule.cs delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/HttpContextIdentityModelDaprActorProxyAuthenticator.cs delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/Properties/launchSettings.json delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/README.md delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN.Abp.Dapr.Actors.IdentityModel.csproj delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/DaprActorConfigurationExtensions.cs delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/AbpDaprActorsIdentityModelModule.cs delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/IdentityModelDaprActorProxyAuthenticator.cs delete mode 100644 aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/README.md diff --git a/aspnet-core/LINGYUN.MicroService.All.sln b/aspnet-core/LINGYUN.MicroService.All.sln index 49afbfbc8..4efb91e18 100644 --- a/aspnet-core/LINGYUN.MicroService.All.sln +++ b/aspnet-core/LINGYUN.MicroService.All.sln @@ -230,10 +230,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.Applic EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Auditing.HttpApi", "modules\auditing\LINGYUN.Abp.Auditing.HttpApi\LINGYUN.Abp.Auditing.HttpApi.csproj", "{07E19CA8-671D-4D58-9FED-5FEE9AE01A2F}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Rules", "modules\common\LINGYUN.Abp.Rules\LINGYUN.Abp.Rules.csproj", "{8ACB30CF-2311-4C0A-AE79-92C1A7667353}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Rules.NRules", "modules\common\LINGYUN.Abp.Rules.NRules\LINGYUN.Abp.Rules.NRules.csproj", "{0BA9FF71-C55E-483B-B83A-6B4BD8ABBBB1}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "permission-management", "permission-management", "{CC362C67-6FC1-42B3-A130-8120AA8D790C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.PermissionManagement.Domain", "modules\permissions-management\LINGYUN.Abp.PermissionManagement.Domain\LINGYUN.Abp.PermissionManagement.Domain.csproj", "{B46D6DAF-98C6-441F-9FA5-3CAD7CF27727}" @@ -298,8 +294,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Localization.Xm EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Localization.Xml.Tests", "tests\LINGYUN.Abp.Localization.Xml.Tests\LINGYUN.Abp.Localization.Xml.Tests.csproj", "{A061D2B4-B650-4F7F-A6CB-5C8FFFD512ED}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Localization.Json", "modules\localization\LINGYUN.Abp.Localization.Json\LINGYUN.Abp.Localization.Json.csproj", "{EA563F48-A6EF-4886-B607-2A83F7795F1B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Localization.Json.Tests", "tests\LINGYUN.Abp.Localization.Json.Tests\LINGYUN.Abp.Localization.Json.Tests.csproj", "{EBCF7D88-49E2-413D-A7A6-1A76BC2E8161}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Localization.Dynamic", "modules\common\LINGYUN.Abp.Localization.Dynamic\LINGYUN.Abp.Localization.Dynamic.csproj", "{4A9043FD-24A3-4A4A-956B-9CB71876F415}" @@ -325,6 +319,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "localization", "localizatio EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.LocalizationManagement.HttpApi.Host", "services\localization\LINGYUN.Abp.LocalizationManagement.HttpApi.Host\LINGYUN.Abp.LocalizationManagement.HttpApi.Host.csproj", "{6FFC14FE-F659-4B23-9746-4B767CE520D2}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rules", "rules", "{6084D52D-775B-4A39-8CD5-AA2F362B5A61}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Rules", "modules\rules\LINGYUN.Abp.Rules\LINGYUN.Abp.Rules.csproj", "{D60EFB8E-F168-4EF2-8D8F-ED42EB6FB8CF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Rules.NRules", "modules\rules\LINGYUN.Abp.Rules.NRules\LINGYUN.Abp.Rules.NRules.csproj", "{34BB9810-2983-4E55-A96A-132D32310145}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Rules.RulesEngine", "modules\rules\LINGYUN.Abp.Rules.RulesEngine\LINGYUN.Abp.Rules.RulesEngine.csproj", "{4D83BDA7-2059-41C7-85AE-FEFAD5CD9498}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -695,14 +697,6 @@ Global {07E19CA8-671D-4D58-9FED-5FEE9AE01A2F}.Debug|Any CPU.Build.0 = Debug|Any CPU {07E19CA8-671D-4D58-9FED-5FEE9AE01A2F}.Release|Any CPU.ActiveCfg = Release|Any CPU {07E19CA8-671D-4D58-9FED-5FEE9AE01A2F}.Release|Any CPU.Build.0 = Release|Any CPU - {8ACB30CF-2311-4C0A-AE79-92C1A7667353}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8ACB30CF-2311-4C0A-AE79-92C1A7667353}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8ACB30CF-2311-4C0A-AE79-92C1A7667353}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8ACB30CF-2311-4C0A-AE79-92C1A7667353}.Release|Any CPU.Build.0 = Release|Any CPU - {0BA9FF71-C55E-483B-B83A-6B4BD8ABBBB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0BA9FF71-C55E-483B-B83A-6B4BD8ABBBB1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0BA9FF71-C55E-483B-B83A-6B4BD8ABBBB1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0BA9FF71-C55E-483B-B83A-6B4BD8ABBBB1}.Release|Any CPU.Build.0 = Release|Any CPU {B46D6DAF-98C6-441F-9FA5-3CAD7CF27727}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B46D6DAF-98C6-441F-9FA5-3CAD7CF27727}.Debug|Any CPU.Build.0 = Debug|Any CPU {B46D6DAF-98C6-441F-9FA5-3CAD7CF27727}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -811,10 +805,6 @@ Global {A061D2B4-B650-4F7F-A6CB-5C8FFFD512ED}.Debug|Any CPU.Build.0 = Debug|Any CPU {A061D2B4-B650-4F7F-A6CB-5C8FFFD512ED}.Release|Any CPU.ActiveCfg = Release|Any CPU {A061D2B4-B650-4F7F-A6CB-5C8FFFD512ED}.Release|Any CPU.Build.0 = Release|Any CPU - {EA563F48-A6EF-4886-B607-2A83F7795F1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA563F48-A6EF-4886-B607-2A83F7795F1B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA563F48-A6EF-4886-B607-2A83F7795F1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA563F48-A6EF-4886-B607-2A83F7795F1B}.Release|Any CPU.Build.0 = Release|Any CPU {EBCF7D88-49E2-413D-A7A6-1A76BC2E8161}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EBCF7D88-49E2-413D-A7A6-1A76BC2E8161}.Debug|Any CPU.Build.0 = Debug|Any CPU {EBCF7D88-49E2-413D-A7A6-1A76BC2E8161}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -851,6 +841,18 @@ Global {6FFC14FE-F659-4B23-9746-4B767CE520D2}.Debug|Any CPU.Build.0 = Debug|Any CPU {6FFC14FE-F659-4B23-9746-4B767CE520D2}.Release|Any CPU.ActiveCfg = Release|Any CPU {6FFC14FE-F659-4B23-9746-4B767CE520D2}.Release|Any CPU.Build.0 = Release|Any CPU + {D60EFB8E-F168-4EF2-8D8F-ED42EB6FB8CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D60EFB8E-F168-4EF2-8D8F-ED42EB6FB8CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D60EFB8E-F168-4EF2-8D8F-ED42EB6FB8CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D60EFB8E-F168-4EF2-8D8F-ED42EB6FB8CF}.Release|Any CPU.Build.0 = Release|Any CPU + {34BB9810-2983-4E55-A96A-132D32310145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34BB9810-2983-4E55-A96A-132D32310145}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34BB9810-2983-4E55-A96A-132D32310145}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34BB9810-2983-4E55-A96A-132D32310145}.Release|Any CPU.Build.0 = Release|Any CPU + {4D83BDA7-2059-41C7-85AE-FEFAD5CD9498}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D83BDA7-2059-41C7-85AE-FEFAD5CD9498}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D83BDA7-2059-41C7-85AE-FEFAD5CD9498}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D83BDA7-2059-41C7-85AE-FEFAD5CD9498}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -965,8 +967,6 @@ Global {F40F88F1-CA90-4A79-B772-80E287E25982} = {67DAB2A0-D407-4CAB-8414-AE3D0AC52FC4} {AC3C8985-73C2-472A-8E76-A0B8786FEC3F} = {67DAB2A0-D407-4CAB-8414-AE3D0AC52FC4} {07E19CA8-671D-4D58-9FED-5FEE9AE01A2F} = {67DAB2A0-D407-4CAB-8414-AE3D0AC52FC4} - {8ACB30CF-2311-4C0A-AE79-92C1A7667353} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E} - {0BA9FF71-C55E-483B-B83A-6B4BD8ABBBB1} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E} {CC362C67-6FC1-42B3-A130-8120AA8D790C} = {C5CAD011-DF84-4914-939C-0C029DCEF26F} {B46D6DAF-98C6-441F-9FA5-3CAD7CF27727} = {CC362C67-6FC1-42B3-A130-8120AA8D790C} {2D377D3A-70EC-4BB3-9F4C-6C933693DA98} = {52B5D4F7-237B-4E0A-A167-68442164F70A} @@ -999,7 +999,6 @@ Global {90E88EAC-4291-4406-8D88-EFDF61B11292} = {C5CAD011-DF84-4914-939C-0C029DCEF26F} {84868710-ECBB-4025-900A-EEB99EC49534} = {90E88EAC-4291-4406-8D88-EFDF61B11292} {A061D2B4-B650-4F7F-A6CB-5C8FFFD512ED} = {370D7CD5-1E17-4F3D-BBFA-03429F6D4F2F} - {EA563F48-A6EF-4886-B607-2A83F7795F1B} = {90E88EAC-4291-4406-8D88-EFDF61B11292} {EBCF7D88-49E2-413D-A7A6-1A76BC2E8161} = {370D7CD5-1E17-4F3D-BBFA-03429F6D4F2F} {4A9043FD-24A3-4A4A-956B-9CB71876F415} = {8AC72641-30D3-4ACF-89FA-808FADC55C2E} {D3BAA44E-8395-4E8A-AA96-6B463356C537} = {C5CAD011-DF84-4914-939C-0C029DCEF26F} @@ -1011,6 +1010,10 @@ Global {FBE91498-D83B-4873-A67E-0FB9D1C366F0} = {D3BAA44E-8395-4E8A-AA96-6B463356C537} {A2EA6B3F-AD1A-4FDA-B12E-F71B20A43A6B} = {672E1170-7B18-474B-85C7-1961BF2A48AE} {6FFC14FE-F659-4B23-9746-4B767CE520D2} = {A2EA6B3F-AD1A-4FDA-B12E-F71B20A43A6B} + {6084D52D-775B-4A39-8CD5-AA2F362B5A61} = {C5CAD011-DF84-4914-939C-0C029DCEF26F} + {D60EFB8E-F168-4EF2-8D8F-ED42EB6FB8CF} = {6084D52D-775B-4A39-8CD5-AA2F362B5A61} + {34BB9810-2983-4E55-A96A-132D32310145} = {6084D52D-775B-4A39-8CD5-AA2F362B5A61} + {4D83BDA7-2059-41C7-85AE-FEFAD5CD9498} = {6084D52D-775B-4A39-8CD5-AA2F362B5A61} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/AbpNRulesModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/AbpNRulesModule.cs deleted file mode 100644 index c42aecd61..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/AbpNRulesModule.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using System; -using System.Collections.Generic; -using Volo.Abp.Modularity; -using NRule = NRules.Fluent.Dsl.Rule; - -namespace LINGYUN.Abp.Rules.NRules -{ - [DependsOn( - typeof(AbpRulesModule) - )] - public class AbpNRulesModule : AbpModule - { - private readonly AbpNRulesOptions options = new AbpNRulesOptions(); - public override void PreConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddObjectAccessor(options); - context.Services.OnRegistred(ctx => - { - if (ctx.ImplementationType.IsAssignableTo(typeof(NRule))) - { - options.Rules.AddIfNotContains(ctx.ImplementationType); - } - }); - } - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddNRules(options); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN.Abp.Rules.NRules.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN.Abp.Rules.NRules.csproj deleted file mode 100644 index 03004c55a..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN.Abp.Rules.NRules.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - netstandard2.0 - - - - - - - - - - - - - - - - diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpNRulesOptions.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpNRulesOptions.cs deleted file mode 100644 index 0fb5079a6..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpNRulesOptions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Volo.Abp.Collections; -using NRule = NRules.Fluent.Dsl.Rule; - -namespace LINGYUN.Abp.Rules -{ - public class AbpNRulesOptions - { - public ITypeList Rules { get; } - public AbpNRulesOptions() - { - Rules = new TypeList(); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpRuleRepository.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpRuleRepository.cs deleted file mode 100644 index 89ff7f9eb..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/AbpRuleRepository.cs +++ /dev/null @@ -1,44 +0,0 @@ -using NRules.RuleModel; -using System; -using System.Collections.Generic; - -namespace LINGYUN.Abp.Rules -{ - public class AbpRuleRepository : INRulesRepository - { - public void Add(IRuleSet ruleSet) - { - throw new NotImplementedException(); - } - - public IEnumerable GetRuleSets() - { - throw new NotImplementedException(); - } - - public void Remove(string ruleSetName) - { - throw new NotImplementedException(); - } - - public void Remove(IRuleSet ruleSet) - { - throw new NotImplementedException(); - } - - public IRuleSet GetRuleSet(string ruleSetName) - { - return new RuleSet(ruleSetName); - } - - public IRuleSet GetRuleSet(RuleGroup group) - { - throw new NotImplementedException(); - } - - public IEnumerable GetRuleSets(IEnumerable groups) - { - throw new NotImplementedException(); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/DependencyResolver.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/DependencyResolver.cs deleted file mode 100644 index d898645e0..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/DependencyResolver.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using NRules.Extensibility; -using System; - -namespace LINGYUN.Abp.Rules -{ - public class DependencyResolver : IDependencyResolver - { - protected IServiceProvider ServiceProvider { get; } - public DependencyResolver(IServiceProvider serviceProvider) - { - ServiceProvider = serviceProvider; - } - - public virtual object Resolve(IResolutionContext context, Type serviceType) - { - return ServiceProvider.GetRequiredService(serviceType); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/INRulesRepository.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/INRulesRepository.cs deleted file mode 100644 index 67b10fcd8..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/INRulesRepository.cs +++ /dev/null @@ -1,20 +0,0 @@ -using NRules.RuleModel; -using System.Collections.Generic; - -namespace LINGYUN.Abp.Rules -{ - public interface INRulesRepository : IRuleRepository - { - void Add(IRuleSet ruleSet); - - void Remove(string ruleSetName); - - void Remove(IRuleSet ruleSet); - - IRuleSet GetRuleSet(string ruleSetName); - - IRuleSet GetRuleSet(RuleGroup group); - - IEnumerable GetRuleSets(IEnumerable groups); - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/NRulesEntityRuleContributor.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/NRulesEntityRuleContributor.cs deleted file mode 100644 index 308f315cb..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/NRulesEntityRuleContributor.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using NRules.RuleModel; -using NRules.RuleModel.Builders; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Dynamic.Core; -using System.Linq.Expressions; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; - -namespace LINGYUN.Abp.Rules -{ - [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] - [ExposeServices(typeof(IEntityRuleContributor))] - public class NRulesEntityRuleContributor : IEntityRuleContributor - { - protected INRulesRepository Repository { get; } - public Task ApplyAsync(EntityRuleContext context) - { - var entityType = context.Entity.GetType(); - var entityRuleName = RuleNameAttribute.GetRuleName(entityType); - - - - IEnumerable groupRuleSets = new List(); - - groupRuleSets = Repository.GetRuleSets(context.Groups); - - var sessionFactory = Repository.Compile(context.Groups); - var session = sessionFactory.CreateSession(); - session.Insert(context.Entity); - - session.Fire(); - - foreach (var groupRuleSet in groupRuleSets) - { - } - - foreach (var group in context.Groups) - { - var groupRuleSet = new RuleSet(group.Name); - - Repository.GetRuleSet(group.Name); - - foreach (var rule in group.Rules) - { - var builder = new RuleBuilder(); - builder.Name(rule.Name); - - PatternBuilder thisRulePattern = builder.LeftHandSide().Pattern(entityType, entityRuleName); - ParameterExpression thisRuleParameter = thisRulePattern.Declaration.ToParameterExpression(); - var ruleCondition = Expression.Lambda(DynamicExpressionParser.ParseLambda(typeof(bool), rule.Expression), thisRuleParameter); - thisRulePattern.Condition(ruleCondition); - } - } - throw new NotImplementedException(); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/RuleActivator.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/RuleActivator.cs deleted file mode 100644 index 4777a20d6..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/LINGYUN/Abp/Rules/RuleActivator.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using NRules.Fluent; -using System; -using System.Collections.Generic; -using Volo.Abp.DependencyInjection; -using NRule = NRules.Fluent.Dsl.Rule; - -namespace LINGYUN.Abp.Rules -{ - [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] - [ExposeServices(typeof(IRuleActivator))] - public class RuleActivator : IRuleActivator - { - protected IServiceProvider ServiceProvider { get; } - public RuleActivator(IServiceProvider serviceProvider) - { - ServiceProvider = serviceProvider; - } - public virtual IEnumerable Activate(Type type) - { - return (IEnumerable)ServiceProvider.GetServices(type); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/Microsoft/Extensions/DependencyInjection/NRulesServiceCollectionExtensions.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/Microsoft/Extensions/DependencyInjection/NRulesServiceCollectionExtensions.cs deleted file mode 100644 index 2097719c5..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/Microsoft/Extensions/DependencyInjection/NRulesServiceCollectionExtensions.cs +++ /dev/null @@ -1,55 +0,0 @@ -using LINGYUN.Abp.Rules; -using NRules; -using NRules.Fluent; -using NRules.RuleModel; -using System; - -namespace Microsoft.Extensions.DependencyInjection -{ - public static class NRulesServiceCollectionExtensions - { - public static IServiceCollection AddNRules(this IServiceCollection services, AbpNRulesOptions options) - { - services.RegisterRepository(); - services.RegisterSessionFactory(); - services.RegisterSession(); - - return services; - } - - public static IServiceCollection RegisterRepository(this IServiceCollection services) - { - services.AddSingleton(); - - services.AddSingleton(); - services.AddSingleton(); - - return services; - } - - public static IServiceCollection RegisterSessionFactory(this IServiceCollection services) - { - services.RegisterSessionFactory((provider) => provider.GetRequiredService().Compile()); - - return services; - } - - public static IServiceCollection RegisterSessionFactory(this IServiceCollection services, Func compileFunc) - { - services.AddSingleton(); - services.AddSingleton(compileFunc); - - return services; - } - - public static IServiceCollection RegisterSession(this IServiceCollection services) - { - return services.RegisterSession((provider) => provider.GetRequiredService().CreateSession()); - } - - public static IServiceCollection RegisterSession(this IServiceCollection services, Func factoryFunc) - { - return services.AddScoped(factoryFunc); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/NRules/RuleRepositoryExtensions.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/NRules/RuleRepositoryExtensions.cs deleted file mode 100644 index 2f29b2f7f..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules.NRules/NRules/RuleRepositoryExtensions.cs +++ /dev/null @@ -1,15 +0,0 @@ -using NRules; -using System.Collections.Generic; - -namespace LINGYUN.Abp.Rules -{ - public static class RuleRepositoryExtensions - { - public static ISessionFactory Compile(this INRulesRepository repository, IEnumerable groups) - { - var compiler = new RuleCompiler(); - ISessionFactory factory = compiler.Compile(repository.GetRuleSets(groups)); - return factory; - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN.Abp.Rules.csproj b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN.Abp.Rules.csproj deleted file mode 100644 index 3984f255e..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN.Abp.Rules.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - netstandard2.0 - - - - - - - - diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/AbpRulesModule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/AbpRulesModule.cs deleted file mode 100644 index b1167a5cd..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/AbpRulesModule.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Volo.Abp.Domain; -using Volo.Abp.Modularity; - -namespace LINGYUN.Abp.Rules -{ - [DependsOn( - typeof(AbpDddDomainModule))] - public class AbpRulesModule : AbpModule - { - public override void PreConfigureServices(ServiceConfigurationContext context) - { - context.Services.OnRegistred(EntityChangedRulesInterceptorRegistrar.RegisterIfNeeded); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptor.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptor.cs deleted file mode 100644 index 948dde25f..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptor.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Linq; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Domain.Entities; -using Volo.Abp.DynamicProxy; - -namespace LINGYUN.Abp.Rules -{ - public class EntityChangedRulesInterceptor : AbpInterceptor, ITransientDependency - { - protected IRuleFinder RuleFinder { get; } - protected IEntityRuleContributor EntityRuleContributor { get; } - - public EntityChangedRulesInterceptor( - IRuleFinder ruleFinder, - IEntityRuleContributor entityRuleContributor) - { - RuleFinder = ruleFinder; - EntityRuleContributor = entityRuleContributor; - } - - public override async Task InterceptAsync(IAbpMethodInvocation invocation) - { - var entityObj = invocation.Arguments.First(); - // TODO: 针对实体的变更执行一次定义的规则 - // IBasicRepository.InsertAsync || IBasicRepository.UpdateAsync || IBasicRepository.DeleteAsync - if (entityObj != null && entityObj is IEntity entity) - { - await ApplyEntityRuleAsync(entity); - } - - await invocation.ProceedAsync(); - } - - protected virtual async Task ApplyEntityRuleAsync(IEntity entity) - { - Type entityType = ProxyHelper.GetUnProxiedType(entity); - // 加载规则列表 - var groups = await RuleFinder.GetRuleGroupsAsync(entityType); - if (groups.Any()) - { - // 应用规则 - await EntityRuleContributor.ApplyAsync(new EntityRuleContext(groups, entity)); - } - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptorRegistrar.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptorRegistrar.cs deleted file mode 100644 index 3b7b11a4e..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityChangedRulesInterceptorRegistrar.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using Volo.Abp.DependencyInjection; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.DynamicProxy; - -namespace LINGYUN.Abp.Rules -{ - public static class EntityChangedRulesInterceptorRegistrar - { - public static void RegisterIfNeeded(IOnServiceRegistredContext context) - { - if (ShouldIntercept(context.ImplementationType)) - { - context.Interceptors.TryAdd(); - } - } - - private static bool ShouldIntercept(Type type) - { - // 拦截器的要求 - // 1、继承自IBasicRepository的仓储 - // 2、继承自INeedRule接口的实体 - return !DynamicProxyIgnoreTypes.Contains(type) && - type.IsAssignableTo(typeof(IBasicRepository<>)) && - type.GetGenericTypeDefinition().IsAssignableTo(typeof(INeedRule)); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityRuleContext.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityRuleContext.cs deleted file mode 100644 index 58bbd744e..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/EntityRuleContext.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using Volo.Abp.Domain.Entities; - -namespace LINGYUN.Abp.Rules -{ - public class EntityRuleContext - { - public List Groups { get; } - public IEntity Entity { get; } - public EntityRuleContext( - List groups, - IEntity entity) - { - Groups = groups; - Entity = entity; - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ErrorType.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ErrorType.cs deleted file mode 100644 index 6b5825435..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ErrorType.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace LINGYUN.Abp.Rules -{ - public enum ErrorType - { - Warning = 0, - Error = 1 - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ExpressionType.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ExpressionType.cs deleted file mode 100644 index 49fb8dcc1..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/ExpressionType.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace LINGYUN.Abp.Rules -{ - public enum ExpressionType - { - LambdaExpression = 0 - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IEntityRuleContributor.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IEntityRuleContributor.cs deleted file mode 100644 index badbd75ff..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IEntityRuleContributor.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Threading.Tasks; - -namespace LINGYUN.Abp.Rules -{ - public interface IEntityRuleContributor - { - Task ApplyAsync(EntityRuleContext context); - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/INeedRule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/INeedRule.cs deleted file mode 100644 index 7a1faab36..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/INeedRule.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace LINGYUN.Abp.Rules -{ - public interface INeedRule - { - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IRuleFinder.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IRuleFinder.cs deleted file mode 100644 index ee3f61064..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/IRuleFinder.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace LINGYUN.Abp.Rules -{ - public interface IRuleFinder - { - Task> GetRuleGroupsAsync(Type entityType); - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullEntityRuleContributor.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullEntityRuleContributor.cs deleted file mode 100644 index 52a170c94..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullEntityRuleContributor.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; - -namespace LINGYUN.Abp.Rules -{ - public class NullEntityRuleContributor : IEntityRuleContributor, ISingletonDependency - { - public Task ApplyAsync(EntityRuleContext context) - { - return Task.CompletedTask; - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullRuleFinder.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullRuleFinder.cs deleted file mode 100644 index 81aaa79cc..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/NullRuleFinder.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; - -namespace LINGYUN.Abp.Rules -{ - public class NullRuleFinder : IRuleFinder, ISingletonDependency - { - public Task> GetRuleGroupsAsync(Type entityType) - { - return Task.FromResult(new List()); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/Rule.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/Rule.cs deleted file mode 100644 index 4d18e8d5a..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/Rule.cs +++ /dev/null @@ -1,90 +0,0 @@ -using JetBrains.Annotations; -using System; -using System.Collections.Generic; -using Volo.Abp; - -namespace LINGYUN.Abp.Rules -{ - /// - /// ref: https://github.com/microsoft/RulesEngine/blob/master/src/RulesEngine/RulesEngine/Models/Rule.cs - /// - public class Rule - { - [NotNull] - public string Name { get; set; } - public string Operator { get; set; } - public string ErrorMessage { get; set; } - public DateTime CreationTime { get; set; } - public ErrorType ErrorType { get; set; } - public ExpressionType? ExpressionType { get; set; } - public List Rules { get; set; } - public List InjectRules { get; set; } - public List Params { get; set; } - public string Expression { get; set; } - public string SuccessEvent { get; set; } - protected Rule() { } - public Rule( - [NotNull] string name, - string operation, - DateTime creationTime, - string expression = null, - string successEvent = null, - ErrorType errorType = ErrorType.Warning, - ExpressionType? expressionType = null) - { - Check.NotNullOrWhiteSpace(name, nameof(name)); - - Name = name; - Operator = operation; - CreationTime = creationTime; - Expression = expression; - SuccessEvent = successEvent; - ErrorType = errorType; - ExpressionType = expressionType; - - Rules = new List(); - Params = new List(); - InjectRules = new List(); - } - - public Rule CreateChildren(Rule rule) - { - Rules.Add(rule); - - return this; - } - - public Rule WithParam(RuleParam param) - { - Params.AddIfNotContains(param); - return this; - } - - public Rule InjectRule(string ruleName) - { - InjectRules.AddIfNotContains(ruleName); - - return this; - } - - public override int GetHashCode() - { - return Name.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj is Rule rule) - { - return rule.Name.Equals(Name); - } - - return false; - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleGroup.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleGroup.cs deleted file mode 100644 index f426a5a03..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleGroup.cs +++ /dev/null @@ -1,53 +0,0 @@ -using JetBrains.Annotations; -using System.Collections.Generic; -using Volo.Abp; - -namespace LINGYUN.Abp.Rules -{ - public class RuleGroup - { - [NotNull] - public string Name { get; set; } - public List InjectRules { get; set; } - public List Rules { get; } - protected RuleGroup() { } - public RuleGroup( - [NotNull] string name) - { - Check.NotNullOrWhiteSpace(name, nameof(name)); - - Name = name; - - Rules = new List(); - InjectRules = new List(); - } - - public RuleGroup WithInjectRule(string ruleName) - { - InjectRules.AddIfNotContains(ruleName); - - return this; - } - - public RuleGroup WithInjectRule(IEnumerable ruleNames) - { - InjectRules.AddIfNotContains(ruleNames); - - return this; - } - - public RuleGroup WithRule(Rule rule) - { - Rules.AddIfNotContains(rule); - - return this; - } - - public RuleGroup WithRule(IEnumerable rules) - { - Rules.AddIfNotContains(rules); - - return this; - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleNameAttribute.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleNameAttribute.cs deleted file mode 100644 index 532acde00..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleNameAttribute.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Reflection; - -namespace LINGYUN.Abp.Rules -{ - public class RuleNameAttribute : Attribute - { - public string Name { get; } - public RuleNameAttribute(string name) - { - Name = name; - } - - public virtual string GetRuleNameForType(Type ruleType) - { - return Name; - } - - public static string GetRuleName() - { - return GetRuleName(typeof(TEntity)); - } - - public static string GetRuleName(Type entityType) - { - var ruleAttribute = entityType.GetSingleAttributeOrNull(); - if (ruleAttribute != null) - { - return ruleAttribute.GetRuleNameForType(entityType); - } - - return entityType.Name.RemovePostFix("Rule").ToKebabCase(); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleParam.cs b/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleParam.cs deleted file mode 100644 index 086d945b1..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/LINGYUN/Abp/Rules/RuleParam.cs +++ /dev/null @@ -1,45 +0,0 @@ -using JetBrains.Annotations; -using Volo.Abp; - -namespace LINGYUN.Abp.Rules -{ - public class RuleParam - { - [NotNull] - public string Name { get; set; } - - [NotNull] - public string Expression { get; set; } - - protected RuleParam() { } - public RuleParam( - [NotNull] string name, - [NotNull] string expression) - { - Check.NotNullOrWhiteSpace(name, nameof(name)); - Check.NotNullOrWhiteSpace(expression, nameof(expression)); - - Name = name; - Expression = expression; - } - - public override int GetHashCode() - { - return Name.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (obj is RuleParam param) - { - return param.Name.Equals(Name); - } - return base.Equals(obj); - } - } -} diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Rules/README.md b/aspnet-core/modules/common/LINGYUN.Abp.Rules/README.md deleted file mode 100644 index b37832f46..000000000 --- a/aspnet-core/modules/common/LINGYUN.Abp.Rules/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# LINGYUN.Abp.Rules - -规则引擎定义 - -## 配置使用 - -待完善 \ No newline at end of file diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj deleted file mode 100644 index b40c23d89..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - net5.0 - $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; - false - false - false - true - Library - - - - - - - - diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj.user b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj.user deleted file mode 100644 index cff74a90e..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - IIS Express - - \ No newline at end of file diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/AbpDaprActorsIdentityModelWebModule.cs b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/AbpDaprActorsIdentityModelWebModule.cs deleted file mode 100644 index 068dbc8f7..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/AbpDaprActorsIdentityModelWebModule.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Volo.Abp.Modularity; - -namespace LINGYUN.Abp.Dapr.Actors.IdentityModel.Web -{ - [DependsOn( - typeof(AbpDaprActorsIdentityModelModule))] - public class AbpDaprActorsIdentityModelWebModule : AbpModule - { - } -} diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/HttpContextIdentityModelDaprActorProxyAuthenticator.cs b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/HttpContextIdentityModelDaprActorProxyAuthenticator.cs deleted file mode 100644 index 2f4cc8dab..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/LINGYUN/Abp/Dapr/Actors/IdentityModel/Web/HttpContextIdentityModelDaprActorProxyAuthenticator.cs +++ /dev/null @@ -1,51 +0,0 @@ -using LINGYUN.Abp.Dapr.Actors.Authentication; -using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.Abp.IdentityModel; - -namespace LINGYUN.Abp.Dapr.Actors.IdentityModel -{ - [Dependency(ReplaceServices = true)] - public class HttpContextIdentityModelDaprActorProxyAuthenticator : IdentityModelDaprActorProxyAuthenticator - { - public IHttpContextAccessor HttpContextAccessor { get; set; } - - public HttpContextIdentityModelDaprActorProxyAuthenticator( - IIdentityModelAuthenticationService identityModelAuthenticationService) - : base(identityModelAuthenticationService) - { - } - - public override async Task AuthenticateAsync(DaprActorProxyAuthenticateContext context) - { - if (context.RemoteService.GetUseCurrentAccessToken() != false) - { - var accessToken = await GetAccessTokenFromHttpContextOrNullAsync(); - if (accessToken != null) - { - context.Handler.PreConfigure(request => - { - request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); - }); - return; - } - } - - await base.AuthenticateAsync(context); - } - - protected virtual async Task GetAccessTokenFromHttpContextOrNullAsync() - { - var httpContext = HttpContextAccessor?.HttpContext; - if (httpContext == null) - { - return null; - } - - return await httpContext.GetTokenAsync("access_token"); - } - } -} diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/Properties/launchSettings.json b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/Properties/launchSettings.json deleted file mode 100644 index ea7755ed2..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/Properties/launchSettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:25348/", - "sslPort": 44377 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "LINGYUN.Abp.Dapr.Actors.IdentityModel.Web": { - "commandName": "Project", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:5001;http://localhost:5000" - } - } -} \ No newline at end of file diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/README.md b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/README.md deleted file mode 100644 index 359063b86..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel.Web/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# LINGYUN.Abp.Dapr.Actors.IdentityModel.Web - -Dapr.Actors内部使用Http进行服务间调用,此模块用于获取应用当前状态中的身份令牌并传递到远程Actor服务 - -## 配置使用 - -模块按需引用 - -```csharp -[DependsOn(typeof(AbpDaprActorsIdentityModelWebModule))] -public class YouProjectModule : AbpModule -{ - // other -} -``` -## 配置项说明 - - -## 其他 diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN.Abp.Dapr.Actors.IdentityModel.csproj b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN.Abp.Dapr.Actors.IdentityModel.csproj deleted file mode 100644 index c22be39ff..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN.Abp.Dapr.Actors.IdentityModel.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - net5.0 - - - - - - - - - - - - diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/DaprActorConfigurationExtensions.cs b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/DaprActorConfigurationExtensions.cs deleted file mode 100644 index 481ea1290..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/DaprActorConfigurationExtensions.cs +++ /dev/null @@ -1,54 +0,0 @@ -using JetBrains.Annotations; -using System.Collections.Generic; -using Volo.Abp; - -namespace LINGYUN.Abp.Dapr.Actors -{ - public static class DaprActorConfigurationExtensions - { - public const string IdentityClientName = "IdentityClient"; - public const string UseCurrentAccessTokenName = "UseCurrentAccessToken"; - - [CanBeNull] - public static string GetIdentityClient([NotNull] this DaprActorConfiguration configuration) - { - Check.NotNullOrEmpty(configuration, nameof(configuration)); - - return configuration.GetOrDefault(IdentityClientName); - } - - public static DaprActorConfiguration SetIdentityClient([NotNull] this DaprActorConfiguration configuration, [CanBeNull] string value) - { - configuration[IdentityClientName] = value; - return configuration; - } - - [CanBeNull] - public static bool? GetUseCurrentAccessToken([NotNull] this DaprActorConfiguration configuration) - { - Check.NotNullOrEmpty(configuration, nameof(configuration)); - - var value = configuration.GetOrDefault(UseCurrentAccessTokenName); - if (value == null) - { - return null; - } - - return bool.Parse(value); - } - - public static DaprActorConfiguration SetUseCurrentAccessToken([NotNull] this DaprActorConfiguration configuration, [CanBeNull] bool? value) - { - if (value == null) - { - configuration.Remove(UseCurrentAccessTokenName); - } - else - { - configuration[UseCurrentAccessTokenName] = value.Value.ToString().ToLowerInvariant(); - } - - return configuration; - } - } -} diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/AbpDaprActorsIdentityModelModule.cs b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/AbpDaprActorsIdentityModelModule.cs deleted file mode 100644 index d0d79453f..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/AbpDaprActorsIdentityModelModule.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Volo.Abp.IdentityModel; -using Volo.Abp.Modularity; - -namespace LINGYUN.Abp.Dapr.Actors.IdentityModel -{ - [DependsOn( - typeof(AbpDaprActorsModule), - typeof(AbpIdentityModelModule) - )] - public class AbpDaprActorsIdentityModelModule : AbpModule - { - } -} diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/IdentityModelDaprActorProxyAuthenticator.cs b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/IdentityModelDaprActorProxyAuthenticator.cs deleted file mode 100644 index f2c238ac0..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/LINGYUN/Abp/Dapr/Actors/IdentityModel/IdentityModelDaprActorProxyAuthenticator.cs +++ /dev/null @@ -1,66 +0,0 @@ -using LINGYUN.Abp.Dapr.Actors.Authentication; -using LINGYUN.Abp.Dapr.Actors.DynamicProxying; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; -using System; -using System.Collections.Generic; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using Volo.Abp.DependencyInjection; -using Volo.Abp.IdentityModel; - -namespace LINGYUN.Abp.Dapr.Actors.IdentityModel -{ - [Dependency(ReplaceServices = true)] - public class IdentityModelDaprActorProxyAuthenticator : IDaprActorProxyAuthenticator, ITransientDependency - { - protected AbpIdentityClientOptions ClientOptions { get; } - protected IIdentityModelAuthenticationService IdentityModelAuthenticationService { get; } - - public ILogger Logger { get; set; } - - public IdentityModelDaprActorProxyAuthenticator( - IIdentityModelAuthenticationService identityModelAuthenticationService) - { - IdentityModelAuthenticationService = identityModelAuthenticationService; - Logger = NullLogger.Instance; - } - - public virtual async Task AuthenticateAsync(DaprActorProxyAuthenticateContext context) - { - var identityClientName = context.RemoteService.GetIdentityClient(); - var configuration = GetClientConfiguration(identityClientName); - if (configuration == null) - { - Logger.LogWarning($"Could not find {nameof(IdentityClientConfiguration)} for {identityClientName}. Either define a configuration for {identityClientName} or set a default configuration."); - return; - } - var accessToken = await IdentityModelAuthenticationService.GetAccessTokenAsync(configuration); - if (accessToken == null) - { - return; - } - - SetAccessToken(context.Handler, accessToken); - } - - protected virtual void SetAccessToken(DaprHttpClientHandler handler, string accessToken) - { - handler.PreConfigure(request => - { - request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); - }); - } - - private IdentityClientConfiguration GetClientConfiguration(string identityClientName = null) - { - if (identityClientName.IsNullOrEmpty()) - { - return ClientOptions.IdentityClients.Default; - } - - return ClientOptions.IdentityClients.GetOrDefault(identityClientName) ?? - ClientOptions.IdentityClients.Default; - } - } -} diff --git a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/README.md b/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/README.md deleted file mode 100644 index 28dd4a3f4..000000000 --- a/aspnet-core/modules/dapr/LINGYUN.Abp.Dapr.Actors.IdentityModel/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# LINGYUN.Abp.Dapr.Actors.IdentityModel - -Dapr.Actors内部使用Http进行服务间调用,此模块用于传递服务间调用令牌 - -## 配置使用 - -模块按需引用 - -```csharp -[DependsOn(typeof(AbpDaprActorsIdentityModelModule))] -public class YouProjectModule : AbpModule -{ - // other -} -``` -## 配置项说明 - - -## 其他 diff --git a/aspnet-core/modules/localization/LINGYUN.Abp.Localization.Xml/LINGYUN/Abp/Localization/Xml/XmlLocalizationFile.cs b/aspnet-core/modules/localization/LINGYUN.Abp.Localization.Xml/LINGYUN/Abp/Localization/Xml/XmlLocalizationFile.cs index b2f93373e..bd003aa49 100644 --- a/aspnet-core/modules/localization/LINGYUN.Abp.Localization.Xml/LINGYUN/Abp/Localization/Xml/XmlLocalizationFile.cs +++ b/aspnet-core/modules/localization/LINGYUN.Abp.Localization.Xml/LINGYUN/Abp/Localization/Xml/XmlLocalizationFile.cs @@ -7,7 +7,7 @@ using System.Xml.Serialization; namespace LINGYUN.Abp.Localization.Xml { [Serializable] - [XmlRoot(Namespace = "lingyun.abp", ElementName = "localization")] + [XmlRoot(ElementName = "localization")] public class XmlLocalizationFile { [XmlElement("culture")] diff --git a/aspnet-core/tests/LINGYUN.Abp.Localization.Json.Tests/LINGYUN.Abp.Localization.Json.Tests.csproj b/aspnet-core/tests/LINGYUN.Abp.Localization.Json.Tests/LINGYUN.Abp.Localization.Json.Tests.csproj index 6aa92b3f2..9acfeff52 100644 --- a/aspnet-core/tests/LINGYUN.Abp.Localization.Json.Tests/LINGYUN.Abp.Localization.Json.Tests.csproj +++ b/aspnet-core/tests/LINGYUN.Abp.Localization.Json.Tests/LINGYUN.Abp.Localization.Json.Tests.csproj @@ -20,7 +20,6 @@ -