Browse Source

feat: 移除所有类名的Lion前缀,比如LionAbpProCliModule修改为AbpProCliModule

pull/126/head
wangjun 3 years ago
parent
commit
0d1d9da8cc
  1. 35
      aspnet-core/Lion.AbpPro.All.sln
  2. 1
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/GlobalUsings.cs
  3. 20
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProAbpProCapDbProviderInfoProvider.cs
  4. 4
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapDbProviderInfo.cs
  5. 7
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapEntityFrameworkCoreModule.cs
  6. 6
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapOptionsExtensions.cs
  7. 2
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptions.cs
  8. 4
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptionsExtension.cs
  9. 16
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreAbpProCapTransactionApiFactory.cs
  10. 6
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/IAbpProCapDbProviderInfoProvider.cs
  11. 6
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/ILionAbpProCapDbProviderInfoProvider.cs
  12. 7
      aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapEntityFrameworkCoreModule.cs
  13. 10
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/GlobalUsings.cs
  14. 4
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapConsumerServiceSelector.cs
  15. 6
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapDistributedEventBus.cs
  16. 4
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapModule.cs
  17. 16
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissionDefinitionProvider.cs
  18. 2
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissions.cs
  19. 2
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPublisherExtension.cs
  20. 13
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs
  21. 6
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapUnitOfWork.cs
  22. 12
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProJsonSerializer.cs
  23. 2
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/IAbpProCapTransactionApiFactory.cs
  24. 19
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissionDefinitionProvider.cs
  25. 23
      aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapServiceCollectionExtensions.cs
  26. 10
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/GlobalUsings.cs
  27. 18
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs
  28. 4
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Args/CommandLineArgs.cs
  29. 5
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/CliService.cs
  30. 19
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs
  31. 22
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/AbpProManager.cs
  32. 2
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/IAbpProManager.cs
  33. 5
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/NuGet/NuGetService.cs
  34. 4
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProCliOptions.cs
  35. 4
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProTemplateOptions.cs
  36. 22
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs
  37. 5
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/CmdHelper.cs
  38. 101
      aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/ReplaceHelper.cs
  39. 8
      aspnet-core/frameworks/src/Lion.AbpPro.Cli/GlobalUsings.cs
  40. 11
      aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/AbpProCliModule.cs
  41. 10
      aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/Program.cs
  42. 3
      aspnet-core/frameworks/src/Lion.AbpPro.Core/GlobalUsings.cs
  43. 6
      aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/AbpProCoreModule.cs
  44. 8
      aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/LionAbpProCoreModule.cs
  45. 2
      aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/AbpProEntityFrameworkCoreMysqlModule.cs
  46. 2
      aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationConsts.cs
  47. 24
      aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationModule.cs
  48. 24
      aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationModule.cs
  49. 7
      aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/AbpProLocalizationResource.cs
  50. 7
      aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/LionAbpProLocalizationResource.cs
  51. 2
      aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBase.cs
  52. 7
      aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBaseModule.cs
  53. 32
      aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProManagerTests.cs
  54. 32
      aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProManagerTests.cs
  55. 2
      aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBase.cs
  56. 2
      aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBaseModule.cs
  57. 2
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/TestsModule.cs
  58. 2
      aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBase.cs
  59. 4
      aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBaseModule.cs
  60. 8
      aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTests.cs
  61. 2
      aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/BasicManagementDomainSharedModule.cs
  62. 2
      aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs
  63. 2
      aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/FileManagementDomainSharedModule.cs
  64. 2
      aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs
  65. 2
      aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs
  66. 2
      aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs
  67. 8
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs
  68. 2
      aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs
  69. 2
      aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs
  70. 2
      templates/abp-vnext-pro-nuget-all/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs
  71. 2
      templates/abp-vnext-pro-nuget-module/src/MyCompanyName.MyProjectName.MyModuleName.Domain.Shared/MyModuleNameDomainSharedModule.cs
  72. 2
      templates/abp-vnext-pro-nuget-simplify/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs

35
aspnet-core/Lion.AbpPro.All.sln

@ -388,6 +388,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.Core.Cli.Tests"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCompanyName.MyProjectName.WebGateway", "..\templates\abp-vnext-pro-nuget-all\aspnet-core\host\MyCompanyName.MyProjectName.WebGateway\MyCompanyName.MyProjectName.WebGateway.csproj", "{4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCompanyName.MyProjectName.WebGateway", "..\templates\abp-vnext-pro-nuget-all\aspnet-core\host\MyCompanyName.MyProjectName.WebGateway\MyCompanyName.MyProjectName.WebGateway.csproj", "{4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.ElasticSearch", "frameworks\src\Lion.AbpPro.ElasticSearch\Lion.AbpPro.ElasticSearch.csproj", "{021B499E-ABED-4D1D-B6EB-DC453B5A57A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.EntityFrameworkCore", "frameworks\src\Lion.AbpPro.EntityFrameworkCore\Lion.AbpPro.EntityFrameworkCore.csproj", "{0329D6FA-5048-478C-A399-E9A8FD2B7DF4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.EntityFrameworkCore.Mysql", "frameworks\src\Lion.AbpPro.EntityFrameworkCore.Mysql\Lion.AbpPro.EntityFrameworkCore.Mysql.csproj", "{4E9F48F8-4EBB-4D47-BC10-35760EE4F645}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.ElasticSearch.Tests", "frameworks\test\Lion.AbpPro.ElasticSearch.Tests\Lion.AbpPro.ElasticSearch.Tests.csproj", "{A9824877-9F0C-4E33-BEFC-1DD62A365C75}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.EntityFrameworkCore.Tests", "frameworks\test\Lion.AbpPro.EntityFrameworkCore.Mysql.Tests\Lion.AbpPro.EntityFrameworkCore.Tests.csproj", "{FFD342DF-87A5-4642-B694-58714C506883}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -918,6 +928,26 @@ Global
{4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}.Debug|Any CPU.Build.0 = Debug|Any CPU {4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}.Release|Any CPU.ActiveCfg = Release|Any CPU {4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}.Release|Any CPU.Build.0 = Release|Any CPU {4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F}.Release|Any CPU.Build.0 = Release|Any CPU
{021B499E-ABED-4D1D-B6EB-DC453B5A57A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{021B499E-ABED-4D1D-B6EB-DC453B5A57A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{021B499E-ABED-4D1D-B6EB-DC453B5A57A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{021B499E-ABED-4D1D-B6EB-DC453B5A57A6}.Release|Any CPU.Build.0 = Release|Any CPU
{0329D6FA-5048-478C-A399-E9A8FD2B7DF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0329D6FA-5048-478C-A399-E9A8FD2B7DF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0329D6FA-5048-478C-A399-E9A8FD2B7DF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0329D6FA-5048-478C-A399-E9A8FD2B7DF4}.Release|Any CPU.Build.0 = Release|Any CPU
{4E9F48F8-4EBB-4D47-BC10-35760EE4F645}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4E9F48F8-4EBB-4D47-BC10-35760EE4F645}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E9F48F8-4EBB-4D47-BC10-35760EE4F645}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4E9F48F8-4EBB-4D47-BC10-35760EE4F645}.Release|Any CPU.Build.0 = Release|Any CPU
{A9824877-9F0C-4E33-BEFC-1DD62A365C75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9824877-9F0C-4E33-BEFC-1DD62A365C75}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9824877-9F0C-4E33-BEFC-1DD62A365C75}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9824877-9F0C-4E33-BEFC-1DD62A365C75}.Release|Any CPU.Build.0 = Release|Any CPU
{FFD342DF-87A5-4642-B694-58714C506883}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FFD342DF-87A5-4642-B694-58714C506883}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFD342DF-87A5-4642-B694-58714C506883}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FFD342DF-87A5-4642-B694-58714C506883}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -1093,6 +1123,11 @@ Global
{2DDC4639-710D-4B9C-98E0-03288184B37C} = {18E9B97A-3897-4DA8-810E-4435A777ABA7} {2DDC4639-710D-4B9C-98E0-03288184B37C} = {18E9B97A-3897-4DA8-810E-4435A777ABA7}
{9B65C2C8-E94E-46FD-9841-70DFAE5C85E9} = {EFC415F8-872F-4C7E-8645-31A51481BCFC} {9B65C2C8-E94E-46FD-9841-70DFAE5C85E9} = {EFC415F8-872F-4C7E-8645-31A51481BCFC}
{4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F} = {EA151482-0987-49E0-96A8-2CD876BC8B6E} {4C57F50E-50BE-4C1A-BBA3-9D0DA5BF4D6F} = {EA151482-0987-49E0-96A8-2CD876BC8B6E}
{021B499E-ABED-4D1D-B6EB-DC453B5A57A6} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3}
{0329D6FA-5048-478C-A399-E9A8FD2B7DF4} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3}
{4E9F48F8-4EBB-4D47-BC10-35760EE4F645} = {7BE85EBC-99AD-4CDE-957E-4BDD087FC4E3}
{A9824877-9F0C-4E33-BEFC-1DD62A365C75} = {EFC415F8-872F-4C7E-8645-31A51481BCFC}
{FFD342DF-87A5-4642-B694-58714C506883} = {EFC415F8-872F-4C7E-8645-31A51481BCFC}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}

1
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/GlobalUsings.cs

@ -2,6 +2,7 @@
global using System.Collections.Concurrent; global using System.Collections.Concurrent;
global using DotNetCore.CAP; global using DotNetCore.CAP;
global using Lion.AbpPro.CAP.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore; global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Storage; global using Microsoft.EntityFrameworkCore.Storage;
global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.DependencyInjection;

20
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProLionAbpProCapDbProviderInfoProvider.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProAbpProCapDbProviderInfoProvider.cs

@ -1,41 +1,41 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore; namespace Lion.AbpPro.CAP.EntityFrameworkCore;
public class LionAbpProLionAbpProCapDbProviderInfoProvider : ILionAbpProCapDbProviderInfoProvider, ITransientDependency public class AbpProAbpProCapDbProviderInfoProvider : IAbpProCapDbProviderInfoProvider, ITransientDependency
{ {
protected ConcurrentDictionary<string, LionAbpProCapDbProviderInfo> CapDbProviderInfos { get; set; } = new(); protected ConcurrentDictionary<string, AbpProCapDbProviderInfo> CapDbProviderInfos { get; set; } = new();
public virtual LionAbpProCapDbProviderInfo GetOrNull(string dbProviderName) public virtual AbpProCapDbProviderInfo GetOrNull(string dbProviderName)
{ {
return CapDbProviderInfos.GetOrAdd(dbProviderName, InternalGetOrNull); return CapDbProviderInfos.GetOrAdd(dbProviderName, InternalGetOrNull);
} }
protected virtual LionAbpProCapDbProviderInfo InternalGetOrNull(string databaseProviderName) protected virtual AbpProCapDbProviderInfo InternalGetOrNull(string databaseProviderName)
{ {
switch (databaseProviderName) switch (databaseProviderName)
{ {
case "Microsoft.EntityFrameworkCore.SqlServer": case "Microsoft.EntityFrameworkCore.SqlServer":
return new LionAbpProCapDbProviderInfo( return new AbpProCapDbProviderInfo(
"DotNetCore.CAP.SqlServerCapTransaction, DotNetCore.CAP.SqlServer", "DotNetCore.CAP.SqlServerCapTransaction, DotNetCore.CAP.SqlServer",
"Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.SqlServer"); "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.SqlServer");
case "Npgsql.EntityFrameworkCore.PostgreSQL": case "Npgsql.EntityFrameworkCore.PostgreSQL":
return new LionAbpProCapDbProviderInfo( return new AbpProCapDbProviderInfo(
"DotNetCore.CAP.PostgreSqlCapTransaction, DotNetCore.CAP.PostgreSql", "DotNetCore.CAP.PostgreSqlCapTransaction, DotNetCore.CAP.PostgreSql",
"Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.PostgreSQL"); "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.PostgreSQL");
case "Pomelo.EntityFrameworkCore.MySql": case "Pomelo.EntityFrameworkCore.MySql":
return new LionAbpProCapDbProviderInfo( return new AbpProCapDbProviderInfo(
"DotNetCore.CAP.MySqlCapTransaction, DotNetCore.CAP.MySql", "DotNetCore.CAP.MySqlCapTransaction, DotNetCore.CAP.MySql",
"Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.MySql"); "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.MySql");
case "Oracle.EntityFrameworkCore": case "Oracle.EntityFrameworkCore":
case "Devart.Data.Oracle.Entity.EFCore": case "Devart.Data.Oracle.Entity.EFCore":
return new LionAbpProCapDbProviderInfo( return new AbpProCapDbProviderInfo(
"DotNetCore.CAP.OracleCapTransaction, DotNetCore.CAP.Oracle", "DotNetCore.CAP.OracleCapTransaction, DotNetCore.CAP.Oracle",
"Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.Oracle"); "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.Oracle");
case "Microsoft.EntityFrameworkCore.Sqlite": case "Microsoft.EntityFrameworkCore.Sqlite":
return new LionAbpProCapDbProviderInfo( return new AbpProCapDbProviderInfo(
"DotNetCore.CAP.SqliteCapTransaction, DotNetCore.CAP.Sqlite", "DotNetCore.CAP.SqliteCapTransaction, DotNetCore.CAP.Sqlite",
"Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.Sqlite"); "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.Sqlite");
case "Microsoft.EntityFrameworkCore.InMemory": case "Microsoft.EntityFrameworkCore.InMemory":
return new LionAbpProCapDbProviderInfo( return new AbpProCapDbProviderInfo(
"DotNetCore.CAP.InMemoryCapTransaction, DotNetCore.CAP.InMemoryStorage", "DotNetCore.CAP.InMemoryCapTransaction, DotNetCore.CAP.InMemoryStorage",
"Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.InMemoryStorage"); "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.InMemoryStorage");
default: default:

4
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapDbProviderInfo.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapDbProviderInfo.cs

@ -1,12 +1,12 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore; namespace Lion.AbpPro.CAP.EntityFrameworkCore;
public class LionAbpProCapDbProviderInfo public class AbpProCapDbProviderInfo
{ {
public Type CapTransactionType { get; } public Type CapTransactionType { get; }
public Type CapEfDbTransactionType { get; } public Type CapEfDbTransactionType { get; }
public LionAbpProCapDbProviderInfo(string capTransactionTypeName, string capEfDbTransactionTypeName) public AbpProCapDbProviderInfo(string capTransactionTypeName, string capEfDbTransactionTypeName)
{ {
CapTransactionType = Type.GetType(capTransactionTypeName, false); CapTransactionType = Type.GetType(capTransactionTypeName, false);
CapEfDbTransactionType = Type.GetType(capEfDbTransactionTypeName, false); CapEfDbTransactionType = Type.GetType(capEfDbTransactionTypeName, false);

7
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapEntityFrameworkCoreModule.cs

@ -0,0 +1,7 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore
{
[DependsOn(typeof(AbpProCapModule))]
public class AbpProCapEntityFrameworkCoreModule : AbpModule
{
}
}

6
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapOptionsExtensions.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapOptionsExtensions.cs

@ -1,13 +1,11 @@
using Lion.AbpPro.CAP.EntityFrameworkCore;
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection namespace Microsoft.Extensions.DependencyInjection
{ {
public static class LionAbpProCapOptionsExtensions public static class AbpProCapOptionsExtensions
{ {
public static CapOptions SetCapDbConnectionString(this CapOptions options, string dbConnectionString) public static CapOptions SetCapDbConnectionString(this CapOptions options, string dbConnectionString)
{ {
options.RegisterExtension(new LionAbpProEfCoreDbContextCapOptionsExtension options.RegisterExtension(new AbpProEfCoreDbContextCapOptionsExtension
{ {
CapUsingDbConnectionString = dbConnectionString CapUsingDbConnectionString = dbConnectionString
}); });

2
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptions.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptions.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore; namespace Lion.AbpPro.CAP.EntityFrameworkCore;
public class LionAbpProEfCoreDbContextCapOptions public class AbpProEfCoreDbContextCapOptions
{ {
public string CapUsingDbConnectionString { get; set; } public string CapUsingDbConnectionString { get; set; }
} }

4
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptionsExtension.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptionsExtension.cs

@ -1,12 +1,12 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore; namespace Lion.AbpPro.CAP.EntityFrameworkCore;
public class LionAbpProEfCoreDbContextCapOptionsExtension : ICapOptionsExtension public class AbpProEfCoreDbContextCapOptionsExtension : ICapOptionsExtension
{ {
public string CapUsingDbConnectionString { get; init; } public string CapUsingDbConnectionString { get; init; }
public void AddServices(IServiceCollection services) public void AddServices(IServiceCollection services)
{ {
services.Configure<LionAbpProEfCoreDbContextCapOptions>(options => services.Configure<AbpProEfCoreDbContextCapOptions>(options =>
{ {
options.CapUsingDbConnectionString = CapUsingDbConnectionString; options.CapUsingDbConnectionString = CapUsingDbConnectionString;
}); });

16
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreLionAbpProCapTransactionApiFactory.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreAbpProCapTransactionApiFactory.cs

@ -1,23 +1,23 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore; namespace Lion.AbpPro.CAP.EntityFrameworkCore;
public class EfCoreLionAbpProCapTransactionApiFactory : ILionAbpProCapTransactionApiFactory, ITransientDependency public class EfCoreAbpProCapTransactionApiFactory : IAbpProCapTransactionApiFactory, ITransientDependency
{ {
public Type TransactionApiType { get; } = typeof(EfCoreTransactionApi); public Type TransactionApiType { get; } = typeof(EfCoreTransactionApi);
protected readonly ICapPublisher Publisher; protected readonly ICapPublisher Publisher;
protected readonly LionAbpProEfCoreDbContextCapOptions Options; protected readonly AbpProEfCoreDbContextCapOptions Options;
protected readonly ILionAbpProCapDbProviderInfoProvider LionAbpProCapDbProviderInfoProvider; protected readonly IAbpProCapDbProviderInfoProvider AbpProCapDbProviderInfoProvider;
protected readonly ICancellationTokenProvider CancellationTokenProvider; protected readonly ICancellationTokenProvider CancellationTokenProvider;
public EfCoreLionAbpProCapTransactionApiFactory( public EfCoreAbpProCapTransactionApiFactory(
ICapPublisher publisher, ICapPublisher publisher,
IOptions<LionAbpProEfCoreDbContextCapOptions> options, IOptions<AbpProEfCoreDbContextCapOptions> options,
ILionAbpProCapDbProviderInfoProvider lionAbpProCapDbProviderInfoProvider, IAbpProCapDbProviderInfoProvider abpProCapDbProviderInfoProvider,
ICancellationTokenProvider cancellationTokenProvider) ICancellationTokenProvider cancellationTokenProvider)
{ {
Publisher = publisher; Publisher = publisher;
Options = options.Value; Options = options.Value;
LionAbpProCapDbProviderInfoProvider = lionAbpProCapDbProviderInfoProvider; AbpProCapDbProviderInfoProvider = abpProCapDbProviderInfoProvider;
CancellationTokenProvider = cancellationTokenProvider; CancellationTokenProvider = cancellationTokenProvider;
} }
@ -40,7 +40,7 @@ public class EfCoreLionAbpProCapTransactionApiFactory : ILionAbpProCapTransactio
// return null; // return null;
// } // }
var dbProviderInfo = LionAbpProCapDbProviderInfoProvider.GetOrNull(originalApi.StarterDbContext.Database.ProviderName); var dbProviderInfo = AbpProCapDbProviderInfoProvider.GetOrNull(originalApi.StarterDbContext.Database.ProviderName);
if (dbProviderInfo?.CapTransactionType is null || dbProviderInfo.CapEfDbTransactionType is null) if (dbProviderInfo?.CapTransactionType is null || dbProviderInfo.CapEfDbTransactionType is null)
{ {

6
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/IAbpProCapDbProviderInfoProvider.cs

@ -0,0 +1,6 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore;
public interface IAbpProCapDbProviderInfoProvider
{
AbpProCapDbProviderInfo GetOrNull(string dbProviderName);
}

6
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/ILionAbpProCapDbProviderInfoProvider.cs

@ -1,6 +0,0 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore;
public interface ILionAbpProCapDbProviderInfoProvider
{
LionAbpProCapDbProviderInfo GetOrNull(string dbProviderName);
}

7
aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapEntityFrameworkCoreModule.cs

@ -1,7 +0,0 @@
namespace Lion.AbpPro.CAP.EntityFrameworkCore
{
[DependsOn(typeof(LionAbpProCapModule))]
public class LionAbpProCapEntityFrameworkCoreModule : AbpModule
{
}
}

10
aspnet-core/frameworks/src/Lion.AbpPro.CAP/GlobalUsings.cs

@ -1,3 +1,11 @@
// Global using directives // Global using directives
global using Volo.Abp.Authorization.Permissions; global using System.Text;
global using System.Text.Json;
global using DotNetCore.CAP.Messages;
global using DotNetCore.CAP.Serialization;
global using Lion.AbpPro.Localization;
global using Microsoft.Extensions.DependencyInjection.Extensions;
global using Volo.Abp.Authorization.Permissions;
global using Volo.Abp.Json;
global using Volo.Abp.Localization;

4
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapConsumerServiceSelector.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapConsumerServiceSelector.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.CAP; namespace Lion.AbpPro.CAP;
public class LionAbpProCapConsumerServiceSelector : ConsumerServiceSelector, ISingletonDependency public class AbpProCapConsumerServiceSelector : ConsumerServiceSelector, ISingletonDependency
{ {
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
protected IServiceProvider ServiceProvider { get; } protected IServiceProvider ServiceProvider { get; }
@ -8,7 +8,7 @@ public class LionAbpProCapConsumerServiceSelector : ConsumerServiceSelector, ISi
/// <summary> /// <summary>
/// Creates a new <see cref="T:DotNetCore.CAP.Internal.ConsumerServiceSelector" />. /// Creates a new <see cref="T:DotNetCore.CAP.Internal.ConsumerServiceSelector" />.
/// </summary> /// </summary>
public LionAbpProCapConsumerServiceSelector(IServiceProvider serviceProvider, IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions) : base(serviceProvider) public AbpProCapConsumerServiceSelector(IServiceProvider serviceProvider, IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions) : base(serviceProvider)
{ {
ServiceProvider = serviceProvider; ServiceProvider = serviceProvider;
AbpDistributedEventBusOptions = distributedEventBusOptions.Value; AbpDistributedEventBusOptions = distributedEventBusOptions.Value;

6
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapDistributedEventBus.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapDistributedEventBus.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.CAP; namespace Lion.AbpPro.CAP;
public class LionAbpProCapDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency public class AbpProCapDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency
{ {
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
protected readonly ICapPublisher CapPublisher; protected readonly ICapPublisher CapPublisher;
@ -9,7 +9,7 @@ public class LionAbpProCapDistributedEventBus : EventBusBase, IDistributedEventB
protected ConcurrentDictionary<Type, List<IEventHandlerFactory>> HandlerFactories { get; } protected ConcurrentDictionary<Type, List<IEventHandlerFactory>> HandlerFactories { get; }
protected ConcurrentDictionary<string, Type> EventTypes { get; } protected ConcurrentDictionary<string, Type> EventTypes { get; }
public LionAbpProCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory, public AbpProCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory,
IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions, IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions,
ICapPublisher capPublisher, ICapPublisher capPublisher,
IUnitOfWorkManager unitOfWorkManager, IUnitOfWorkManager unitOfWorkManager,
@ -104,7 +104,7 @@ public class LionAbpProCapDistributedEventBus : EventBusBase, IDistributedEventB
if (useOutbox && UnitOfWorkManager.Current != null) if (useOutbox && UnitOfWorkManager.Current != null)
{ {
if (UnitOfWorkManager.Current is not LionAbpProCapUnitOfWork capUnitOfWork || capUnitOfWork.CapTransaction is null) if (UnitOfWorkManager.Current is not AbpProCapUnitOfWork capUnitOfWork || capUnitOfWork.CapTransaction is null)
{ {
UnitOfWorkManager.Current.OnCompleted(async () => UnitOfWorkManager.Current.OnCompleted(async () =>
{ {

4
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapModule.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapModule.cs

@ -2,8 +2,8 @@ namespace Lion.AbpPro.CAP;
[DependsOn( [DependsOn(
typeof(AbpEventBusModule), typeof(AbpEventBusModule),
typeof(LionAbpProLocalizationModule), typeof(AbpProLocalizationModule),
typeof(AbpUnitOfWorkModule))] typeof(AbpUnitOfWorkModule))]
public class LionAbpProCapModule : AbpModule public class AbpProCapModule : AbpModule
{ {
} }

16
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissionDefinitionProvider.cs

@ -0,0 +1,16 @@
namespace Lion.AbpPro.CAP;
public class AbpProCapPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var abpIdentityGroup = context.GetGroup(AbpProCapPermissions.CapManagement.Default);
abpIdentityGroup.AddPermission(AbpProCapPermissions.CapManagement.Cap, L("Permission:Cap"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<AbpProLocalizationResource>(name);
}
}

2
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissions.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissions.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.CAP; namespace Lion.AbpPro.CAP;
public static class LionAbpProCapPermissions public static class AbpProCapPermissions
{ {
public static class CapManagement public static class CapManagement

2
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPublisherExtension.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPublisherExtension.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.CAP; namespace Lion.AbpPro.CAP;
public static class LionAbpProCapPublisherExtension public static class AbpProCapPublisherExtension
{ {
public static IDisposable UseTransaction(this ICapPublisher capPublisher, ICapTransaction capTransaction) public static IDisposable UseTransaction(this ICapPublisher capPublisher, ICapTransaction capTransaction)
{ {

13
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs

@ -0,0 +1,13 @@
namespace Lion.AbpPro.CAP;
public static class AbpProCapServiceCollectionExtensions
{
public static ServiceConfigurationContext AddAbpCap(this ServiceConfigurationContext context, Action<CapOptions> capAction)
{
context.Services.Replace(ServiceDescriptor.Transient<IUnitOfWork, AbpProCapUnitOfWork>());
context.Services.Replace(ServiceDescriptor.Transient<UnitOfWork, AbpProCapUnitOfWork>());
context.Services.AddTransient<AbpProCapUnitOfWork>();
context.Services.AddCap(capAction);
return context;
}
}

6
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapUnitOfWork.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapUnitOfWork.cs

@ -1,13 +1,13 @@
namespace Lion.AbpPro.CAP; namespace Lion.AbpPro.CAP;
[Dependency(TryRegister = true)] [Dependency(TryRegister = true)]
public class LionAbpProCapUnitOfWork : UnitOfWork public class AbpProCapUnitOfWork : UnitOfWork
{ {
public ICapTransaction CapTransaction { get; protected set; } public ICapTransaction CapTransaction { get; protected set; }
protected ICapPublisher CapPublisher { get; } protected ICapPublisher CapPublisher { get; }
public LionAbpProCapUnitOfWork( public AbpProCapUnitOfWork(
IServiceProvider serviceProvider, IServiceProvider serviceProvider,
IUnitOfWorkEventPublisher unitOfWorkEventPublisher, IUnitOfWorkEventPublisher unitOfWorkEventPublisher,
IOptions<AbpUnitOfWorkDefaultOptions> options, IOptions<AbpUnitOfWorkDefaultOptions> options,
@ -19,7 +19,7 @@ public class LionAbpProCapUnitOfWork : UnitOfWork
public override void AddTransactionApi(string key, ITransactionApi api) public override void AddTransactionApi(string key, ITransactionApi api)
{ {
var factories = ServiceProvider.GetServices<ILionAbpProCapTransactionApiFactory>(); var factories = ServiceProvider.GetServices<IAbpProCapTransactionApiFactory>();
var factory = factories.FirstOrDefault(x => x.TransactionApiType == api.GetType()); var factory = factories.FirstOrDefault(x => x.TransactionApiType == api.GetType());

12
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProJsonSerializer.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProJsonSerializer.cs

@ -1,16 +1,10 @@
using System.Text; namespace Lion.AbpPro.CAP;
using System.Text.Json;
using DotNetCore.CAP.Messages;
using DotNetCore.CAP.Serialization;
using Volo.Abp.Json;
namespace Lion.AbpPro.CAP; public class AbpProJsonSerializer : ISerializer, ISingletonDependency
public class LionAbpProJsonSerializer : ISerializer, ISingletonDependency
{ {
private readonly IJsonSerializer _jsonSerializer; private readonly IJsonSerializer _jsonSerializer;
public LionAbpProJsonSerializer(IJsonSerializer jsonSerializer) public AbpProJsonSerializer(IJsonSerializer jsonSerializer)
{ {
_jsonSerializer = jsonSerializer; _jsonSerializer = jsonSerializer;
} }

2
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/ILionAbpProCapTransactionApiFactory.cs → aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/IAbpProCapTransactionApiFactory.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.CAP; namespace Lion.AbpPro.CAP;
public interface ILionAbpProCapTransactionApiFactory public interface IAbpProCapTransactionApiFactory
{ {
Type TransactionApiType { get; } Type TransactionApiType { get; }

19
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissionDefinitionProvider.cs

@ -1,19 +0,0 @@
using Lion.AbpPro.Localization;
using Volo.Abp.Localization;
namespace Lion.AbpPro.CAP;
public class LionAbpProCapPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var abpIdentityGroup = context.GetGroup(LionAbpProCapPermissions.CapManagement.Default);
abpIdentityGroup.AddPermission(LionAbpProCapPermissions.CapManagement.Cap, L("Permission:Cap"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<LionAbpProLocalizationResource>(name);
}
}

23
aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapServiceCollectionExtensions.cs

@ -1,23 +0,0 @@
using DotNetCore.CAP.Serialization;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace Lion.AbpPro.CAP;
public static class LionAbpProCapServiceCollectionExtensions
{
public static ServiceConfigurationContext AddAbpCap(
this ServiceConfigurationContext context,
Action<CapOptions> capAction)
{
// context.Services.AddSingleton<IConsumerServiceSelector, LionAbpProCapConsumerServiceSelector>();
// context.Services.AddSingleton<IDistributedEventBus, LionAbpProCapDistributedEventBus>();
// context.Services.AddSingleton<ISerializer, LionAbpProJsonSerializer>();
context.Services.Replace(ServiceDescriptor.Transient<IUnitOfWork, LionAbpProCapUnitOfWork>());
context.Services.Replace(ServiceDescriptor.Transient<UnitOfWork, LionAbpProCapUnitOfWork>());
context.Services.AddTransient<LionAbpProCapUnitOfWork>();
context.Services.AddCap(capAction);
return context;
}
}

10
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/GlobalUsings.cs

@ -1,13 +1,17 @@
// Global using directives // Global using directives
global using System.Diagnostics;
global using System.Diagnostics.CodeAnalysis; global using System.Diagnostics.CodeAnalysis;
global using System.Net; global using System.Net;
global using System.Runtime.InteropServices;
global using System.Text; global using System.Text;
global using ICSharpCode.SharpZipLib.Core; global using ICSharpCode.SharpZipLib.Core;
global using ICSharpCode.SharpZipLib.Zip; global using ICSharpCode.SharpZipLib.Zip;
global using Lion.AbpPro.Cli.Args; global using Lion.AbpPro.Cli.Args;
global using Lion.AbpPro.Cli.Commands;
global using Lion.AbpPro.Cli.Github; global using Lion.AbpPro.Cli.Github;
global using Lion.AbpPro.Cli.Options; global using Lion.AbpPro.Cli.Options;
global using Lion.AbpPro.Cli.SourceCode;
global using Lion.AbpPro.Cli.Utils; global using Lion.AbpPro.Cli.Utils;
global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging; global using Microsoft.Extensions.Logging;
@ -17,4 +21,8 @@ global using Polly;
global using Polly.Retry; global using Polly.Retry;
global using Volo.Abp; global using Volo.Abp;
global using Volo.Abp.DependencyInjection; global using Volo.Abp.DependencyInjection;
global using Volo.Abp.IO; global using Volo.Abp.Domain;
global using Volo.Abp.Domain.Services;
global using Volo.Abp.IO;
global using Volo.Abp.Json;
global using Volo.Abp.Modularity;

18
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs

@ -1,8 +1,4 @@
using Lion.AbpPro.Cli.Commands; namespace Lion.AbpPro.Cli;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.Cli;
[DependsOn( [DependsOn(
typeof(AbpDddDomainModule) typeof(AbpDddDomainModule)
@ -14,28 +10,28 @@ public class AbpProCliCoreModule : AbpModule
Configure<AbpCliOptions>(options => { options.Commands[HelpCommand.Name] = typeof(HelpCommand); }); Configure<AbpCliOptions>(options => { options.Commands[HelpCommand.Name] = typeof(HelpCommand); });
Configure<AbpCliOptions>(options => { options.Commands[NewCommand.Name] = typeof(NewCommand); }); Configure<AbpCliOptions>(options => { options.Commands[NewCommand.Name] = typeof(NewCommand); });
Configure<Options.LionAbpProOptions>(options => Configure<Options.AbpProCliOptions>(options =>
{ {
options.Owner = "WangJunZzz"; options.Owner = "WangJunZzz";
options.RepositoryId = "abp-vnext-pro"; options.RepositoryId = "abp-vnext-pro";
options.Token = "abp-vnext-proghp_47vqiabp-vnext-provNkHKJguOJkdHvnxUabp-vnext-protij7Qbdn1Qy3fUabp-vnext-pro"; options.Token = "abp-vnext-proghp_47vqiabp-vnext-provNkHKJguOJkdHvnxUabp-vnext-protij7Qbdn1Qy3fUabp-vnext-pro";
options.Templates = new List<LionAbpProTemplateOptions>() options.Templates = new List<AbpProTemplateOptions>()
{ {
new LionAbpProTemplateOptions("abp-vnext-pro", "pro", "源码版本", true) new AbpProTemplateOptions("abp-vnext-pro", "pro", "源码版本", true)
{ {
ExcludeFiles = "templates,docs,.github,LICENSE,Readme.md", ExcludeFiles = "templates,docs,.github,LICENSE,Readme.md",
ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env",
OldCompanyName = "Lion", OldCompanyName = "Lion",
OldProjectName = "AbpPro" OldProjectName = "AbpPro"
}, },
new LionAbpProTemplateOptions("abp-vnext-pro-nuget-all", "pro.all", "Nuget完整版本") new AbpProTemplateOptions("abp-vnext-pro-nuget-all", "pro.all", "Nuget完整版本")
{ {
//ExcludeFiles = "aspnet-core,vben28,abp-vnext-pro-nuget-module,abp-vnext-pro-nuget-simplify,docs,.github,LICENSE,Readme.md", //ExcludeFiles = "aspnet-core,vben28,abp-vnext-pro-nuget-module,abp-vnext-pro-nuget-simplify,docs,.github,LICENSE,Readme.md",
ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env",
OldCompanyName = "MyCompanyName", OldCompanyName = "MyCompanyName",
OldProjectName = "MyProjectName" OldProjectName = "MyProjectName"
}, },
new LionAbpProTemplateOptions("abp-vnext-pro-nuget-simplify", "pro.simplify", "Nuget简单版本") new AbpProTemplateOptions("abp-vnext-pro-nuget-simplify", "pro.simplify", "Nuget简单版本")
{ {
//ExcludeFiles = "aspnet-core,vben28,abp-vnext-pro-nuget-module,abp-vnext-pro-nuget-all,docs,.github,LICENSE,Readme.md", //ExcludeFiles = "aspnet-core,vben28,abp-vnext-pro-nuget-module,abp-vnext-pro-nuget-all,docs,.github,LICENSE,Readme.md",
ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env",
@ -43,7 +39,7 @@ public class AbpProCliCoreModule : AbpModule
OldProjectName = "MyProjectName" OldProjectName = "MyProjectName"
}, },
new LionAbpProTemplateOptions("abp-vnext-pro-nuget-module", "pro.module", "模块") new AbpProTemplateOptions("abp-vnext-pro-nuget-module", "pro.module", "模块")
{ {
//ExcludeFiles = "aspnet-core,vben28,abp-vnext-pro-nuget-all,abp-vnext-pro-nuget-simplify,docs,.github,LICENSE,Readme.md", //ExcludeFiles = "aspnet-core,vben28,abp-vnext-pro-nuget-all,abp-vnext-pro-nuget-simplify,docs,.github,LICENSE,Readme.md",
ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env",

4
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Args/CommandLineArgs.cs

@ -1,6 +1,4 @@
using Lion.AbpPro.Cli.Commands; namespace Lion.AbpPro.Cli.Args;
namespace Lion.AbpPro.Cli.Args;
public class CommandLineArgs public class CommandLineArgs
{ {

5
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/CliService.cs

@ -1,7 +1,4 @@
using Lion.AbpPro.Cli.Commands; namespace Lion.AbpPro.Cli;
using Volo.Abp.Domain.Services;
namespace Lion.AbpPro.Cli;
public class CliService : DomainService public class CliService : DomainService
{ {

19
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs

@ -1,7 +1,4 @@
using System.Diagnostics; namespace Lion.AbpPro.Cli.Commands;
using Lion.AbpPro.Cli.SourceCode;
namespace Lion.AbpPro.Cli.Commands;
public class NewCommand : IConsoleCommand, ITransientDependency public class NewCommand : IConsoleCommand, ITransientDependency
{ {
@ -9,20 +6,20 @@ public class NewCommand : IConsoleCommand, ITransientDependency
private readonly ILogger<NewCommand> _logger; private readonly ILogger<NewCommand> _logger;
private readonly AbpCliOptions _abpCliOptions; private readonly AbpCliOptions _abpCliOptions;
private readonly IServiceScopeFactory _serviceScopeFactory; private readonly IServiceScopeFactory _serviceScopeFactory;
private readonly Options.LionAbpProOptions _options; private readonly Options.AbpProCliOptions _cliOptions;
private readonly ISourceCodeManager _sourceCodeManager; private readonly ISourceCodeManager _sourceCodeManager;
public NewCommand( public NewCommand(
IOptions<AbpCliOptions> abpCliOptions, IOptions<AbpCliOptions> abpCliOptions,
ILogger<NewCommand> logger, ILogger<NewCommand> logger,
IServiceScopeFactory serviceScopeFactory, IServiceScopeFactory serviceScopeFactory,
IOptions<Options.LionAbpProOptions> options, IOptions<Options.AbpProCliOptions> options,
ISourceCodeManager sourceCodeManager) ISourceCodeManager sourceCodeManager)
{ {
_logger = logger; _logger = logger;
_serviceScopeFactory = serviceScopeFactory; _serviceScopeFactory = serviceScopeFactory;
_sourceCodeManager = sourceCodeManager; _sourceCodeManager = sourceCodeManager;
_options = options.Value; _cliOptions = options.Value;
_abpCliOptions = abpCliOptions.Value; _abpCliOptions = abpCliOptions.Value;
} }
@ -40,7 +37,7 @@ public class NewCommand : IConsoleCommand, ITransientDependency
return; return;
} }
var templateOptions = _options.Templates.FirstOrDefault(e => e.Name == template); var templateOptions = _cliOptions.Templates.FirstOrDefault(e => e.Name == template);
if (templateOptions == null) if (templateOptions == null)
{ {
_logger.LogError("模板类型不正确"); _logger.LogError("模板类型不正确");
@ -48,9 +45,9 @@ public class NewCommand : IConsoleCommand, ITransientDependency
return; return;
} }
context.RepositoryId = _options.RepositoryId; context.RepositoryId = _cliOptions.RepositoryId;
context.Token = _options.DecryptToken; context.Token = _cliOptions.DecryptToken;
context.Owner = _options.Owner; context.Owner = _cliOptions.Owner;
context.TemplateName = templateOptions.Name; context.TemplateName = templateOptions.Name;
context.TemplateKey = templateOptions.Key; context.TemplateKey = templateOptions.Key;
context.IsSource = templateOptions.IsSource; context.IsSource = templateOptions.IsSource;

22
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/LionAbpProManager.cs → aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/AbpProManager.cs

@ -2,15 +2,15 @@ using Uri = System.Uri;
namespace Lion.AbpPro.Cli.Github; namespace Lion.AbpPro.Cli.Github;
public class LionAbpProManager : ITransientDependency, ILionAbpProManager public class AbpProManager : ITransientDependency, IAbpProManager
{ {
private readonly LionAbpProOptions _options; private readonly AbpProCliOptions _cliOptions;
private readonly IHttpClientFactory _httpClientFactory; private readonly IHttpClientFactory _httpClientFactory;
public LionAbpProManager(IOptions<LionAbpProOptions> options, IHttpClientFactory httpClientFactory) public AbpProManager(IOptions<AbpProCliOptions> options, IHttpClientFactory httpClientFactory)
{ {
_httpClientFactory = httpClientFactory; _httpClientFactory = httpClientFactory;
_options = options.Value; _cliOptions = options.Value;
} }
/// <summary> /// <summary>
@ -18,13 +18,13 @@ public class LionAbpProManager : ITransientDependency, ILionAbpProManager
/// </summary> /// </summary>
public async Task<string> GetLatestSourceCodeVersionAsync() public async Task<string> GetLatestSourceCodeVersionAsync()
{ {
var github = new GitHubClient(new ProductHeaderValue(_options.RepositoryId)) var github = new GitHubClient(new ProductHeaderValue(_cliOptions.RepositoryId))
{ {
// 匿名访问,api会限流,所以需要设置访问令牌 // 匿名访问,api会限流,所以需要设置访问令牌
Credentials = new Credentials(_options.DecryptToken) Credentials = new Credentials(_cliOptions.DecryptToken)
}; };
var release = await github.Repository.Release.GetLatest(_options.Owner, _options.RepositoryId); var release = await github.Repository.Release.GetLatest(_cliOptions.Owner, _cliOptions.RepositoryId);
return release?.TagName; return release?.TagName;
} }
@ -35,13 +35,13 @@ public class LionAbpProManager : ITransientDependency, ILionAbpProManager
{ {
try try
{ {
var github = new GitHubClient(new ProductHeaderValue(_options.RepositoryId)) var github = new GitHubClient(new ProductHeaderValue(_cliOptions.RepositoryId))
{ {
// 匿名访问,api会限流,所以需要设置访问令牌 // 匿名访问,api会限流,所以需要设置访问令牌
Credentials = new Credentials(_options.DecryptToken) Credentials = new Credentials(_cliOptions.DecryptToken)
}; };
var release = await github.Repository.Release.Get(_options.Owner, _options.RepositoryId, version); var release = await github.Repository.Release.Get(_cliOptions.Owner, _cliOptions.RepositoryId, version);
return release != null; return release != null;
} }
catch catch
@ -56,7 +56,7 @@ public class LionAbpProManager : ITransientDependency, ILionAbpProManager
public async Task<byte[]> DownloadAsync(string version, string outputPath) public async Task<byte[]> DownloadAsync(string version, string outputPath)
{ {
var httpClient = _httpClientFactory.CreateClient(); var httpClient = _httpClientFactory.CreateClient();
var uri = new Uri($"https://github.com/{_options.Owner}/{_options.RepositoryId}/archive/refs/tags/{version}.zip"); var uri = new Uri($"https://github.com/{_cliOptions.Owner}/{_cliOptions.RepositoryId}/archive/refs/tags/{version}.zip");
var response = await httpClient.GetAsync(uri); var response = await httpClient.GetAsync(uri);
DirectoryHelper.CreateIfNotExists(CliPaths.TemplateCache); DirectoryHelper.CreateIfNotExists(CliPaths.TemplateCache);
var content = await response.Content.ReadAsByteArrayAsync(); var content = await response.Content.ReadAsByteArrayAsync();

2
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/ILionAbpProManager.cs → aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/IAbpProManager.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.Cli.Github; namespace Lion.AbpPro.Cli.Github;
public interface ILionAbpProManager public interface IAbpProManager
{ {
/// <summary> /// <summary>
/// 获取最后一个版本 /// 获取最后一个版本

5
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/NuGet/NuGetService.cs

@ -1,7 +1,4 @@
using Volo.Abp.Domain.Services; namespace Lion.AbpPro.Cli.NuGet;
using Volo.Abp.Json;
namespace Lion.AbpPro.Cli.NuGet;
public class NuGetService : DomainService public class NuGetService : DomainService
{ {

4
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProOptions.cs → aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProCliOptions.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.Cli.Options; namespace Lion.AbpPro.Cli.Options;
public class LionAbpProOptions public class AbpProCliOptions
{ {
/// <summary> /// <summary>
/// 仓库拥有者 /// 仓库拥有者
@ -25,6 +25,6 @@ public class LionAbpProOptions
/// <summary> /// <summary>
/// 模板信息 /// 模板信息
/// </summary> /// </summary>
public List<LionAbpProTemplateOptions> Templates { get; set; } public List<AbpProTemplateOptions> Templates { get; set; }
} }

4
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProTemplateOptions.cs → aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProTemplateOptions.cs

@ -1,8 +1,8 @@
namespace Lion.AbpPro.Cli.Options; namespace Lion.AbpPro.Cli.Options;
public class LionAbpProTemplateOptions public class AbpProTemplateOptions
{ {
public LionAbpProTemplateOptions(string key, string name, string description, bool isSource = false) public AbpProTemplateOptions(string key, string name, string description, bool isSource = false)
{ {
Key = key; Key = key;
Name = name; Name = name;

22
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs

@ -3,14 +3,14 @@ namespace Lion.AbpPro.Cli.SourceCode;
public class SourceCodeManager : ITransientDependency, ISourceCodeManager public class SourceCodeManager : ITransientDependency, ISourceCodeManager
{ {
private readonly ILogger<SourceCodeManager> _logger; private readonly ILogger<SourceCodeManager> _logger;
private readonly ILionAbpProManager _lionAbpProManager; private readonly IAbpProManager _abpProManager;
private readonly LionAbpProOptions _options; private readonly AbpProCliOptions _cliOptions;
public SourceCodeManager(ILogger<SourceCodeManager> logger, IOptions<Options.LionAbpProOptions> options, ILionAbpProManager lionAbpProManager) public SourceCodeManager(ILogger<SourceCodeManager> logger, IOptions<Options.AbpProCliOptions> options, IAbpProManager abpProManager)
{ {
_logger = logger; _logger = logger;
_lionAbpProManager = lionAbpProManager; _abpProManager = abpProManager;
_options = options.Value; _cliOptions = options.Value;
} }
/// <summary> /// <summary>
@ -19,29 +19,29 @@ public class SourceCodeManager : ITransientDependency, ISourceCodeManager
/// <param name="version">版本</param> /// <param name="version">版本</param>
public async Task<TemplateFile> GetAsync(string version) public async Task<TemplateFile> GetAsync(string version)
{ {
var latestVersion = await _lionAbpProManager.GetLatestSourceCodeVersionAsync(); var latestVersion = await _abpProManager.GetLatestSourceCodeVersionAsync();
if (version == null) if (version == null)
{ {
version = latestVersion ?? throw new Exception("请检查版本是否正确"); version = latestVersion ?? throw new Exception("请检查版本是否正确");
} }
else else
{ {
if (!await _lionAbpProManager.CheckSourceCodeVersionAsync(version)) if (!await _abpProManager.CheckSourceCodeVersionAsync(version))
{ {
throw new Exception("没有找到指定的版本: " + version); throw new Exception("没有找到指定的版本: " + version);
} }
} }
var localCacheFile = Path.Combine(CliPaths.TemplateCache, _options.RepositoryId + "-" + version + ".zip"); var localCacheFile = Path.Combine(CliPaths.TemplateCache, _cliOptions.RepositoryId + "-" + version + ".zip");
DirectoryHelper.DeleteIfExists(Path.Combine(CliPaths.TemplateCache, _options.RepositoryId + "-" + version), true); DirectoryHelper.DeleteIfExists(Path.Combine(CliPaths.TemplateCache, _cliOptions.RepositoryId + "-" + version), true);
_logger.LogInformation($"Lion AbpPro Version:{version}"); _logger.LogInformation($"Lion AbpPro Version:{version}");
_logger.LogInformation($"模板生成中......"); _logger.LogInformation($"模板生成中......");
if (!File.Exists(localCacheFile)) if (!File.Exists(localCacheFile))
{ {
return new TemplateFile(version, localCacheFile, await _lionAbpProManager.DownloadAsync(version, localCacheFile)); return new TemplateFile(version, localCacheFile, await _abpProManager.DownloadAsync(version, localCacheFile));
} }
else else
{ {
@ -91,7 +91,7 @@ public class SourceCodeManager : ITransientDependency, ISourceCodeManager
} }
} }
context.ExtractProjectPath = Path.Combine(CliPaths.TemplateCache, _options.RepositoryId + "-" + context.TemplateFile.Version); context.ExtractProjectPath = Path.Combine(CliPaths.TemplateCache, _cliOptions.RepositoryId + "-" + context.TemplateFile.Version);
} }
public void MoveTemplate(SourceCodeContext context) public void MoveTemplate(SourceCodeContext context)

5
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/CmdHelper.cs

@ -1,7 +1,4 @@
using System.Diagnostics; namespace Lion.AbpPro.Cli.Utils;
using System.Runtime.InteropServices;
namespace Lion.AbpPro.Cli.Utils;
public class CmdHelper : ITransientDependency public class CmdHelper : ITransientDependency
{ {

101
aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/ReplaceHelper.cs

@ -2,17 +2,6 @@
public static class ReplaceHelper public static class ReplaceHelper
{ {
// public static void ReplaceTemplates(string sourcePath, string oldCompanyName, string oldProjectName, string companyName, string projectName, string replaceSuffix)
// {
// try
// {
// RenameTemplate(sourcePath, oldCompanyName, oldProjectName, companyName, projectName, replaceSuffix);
// }
// catch (Exception ex)
// {
// throw new UserFriendlyException($"生成模板失败{ex.Message}");
// }
// }
public static void ReplaceTemplates(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName, public static void ReplaceTemplates(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName,
string replaceSuffix) string replaceSuffix)
@ -27,13 +16,6 @@ public static class ReplaceHelper
} }
} }
// private static void RenameTemplate(string sourcePath, string oldCompanyName, string oldProjectName, string companyName, string projectName, string replaceSuffix)
// {
// RenameAllDirectories(sourcePath, oldCompanyName, oldProjectName, companyName, projectName);
//
// RenameAllFileNameAndContent(sourcePath, oldCompanyName, oldProjectName, companyName, projectName, replaceSuffix);
// }
private static void RenameTemplate(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName, private static void RenameTemplate(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName,
string replaceSuffix) string replaceSuffix)
{ {
@ -41,30 +23,6 @@ public static class ReplaceHelper
RenameAllFileNameAndContent(sourcePath, oldCompanyName, oldProjectName, oldModuleName, companyName, projectName, moduleName, replaceSuffix); RenameAllFileNameAndContent(sourcePath, oldCompanyName, oldProjectName, oldModuleName, companyName, projectName, moduleName, replaceSuffix);
} }
// private static void RenameAllDirectories(string sourcePath, string oldCompanyName, string oldProjectName, string companyName, string projectName)
// {
// var directories = Directory.GetDirectories(sourcePath);
// foreach (var subDirectory in directories)
// {
// RenameAllDirectories(subDirectory, oldCompanyName, oldProjectName, companyName, projectName);
//
// var directoryInfo = new DirectoryInfo(subDirectory);
// if (directoryInfo.Name.Contains(oldCompanyName) ||
// directoryInfo.Name.Contains(oldProjectName))
// {
// var oldDirectoryName = directoryInfo.Name;
// var newDirectoryName = oldDirectoryName.CustomReplace(oldCompanyName, oldProjectName, companyName, projectName);
//
// var newDirectoryPath = Path.Combine(directoryInfo.Parent?.FullName, newDirectoryName);
//
// if (directoryInfo.FullName != newDirectoryPath)
// {
// directoryInfo.MoveTo(newDirectoryPath);
// }
// }
// }
// }
private static void RenameAllDirectories(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName) private static void RenameAllDirectories(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName)
{ {
var directories = Directory.GetDirectories(sourcePath); var directories = Directory.GetDirectories(sourcePath);
@ -89,46 +47,7 @@ public static class ReplaceHelper
} }
} }
} }
// private static void RenameAllFileNameAndContent(string sourcePath, string oldCompanyName, string oldProjectName, string companyName, string projectName, string replaceSuffix)
// {
// var list = new DirectoryInfo(sourcePath)
// .GetFiles()
// .Where(f => replaceSuffix.Contains(f.Extension))
// .ToList();
//
// var encoding = new UTF8Encoding(false);
// foreach (var fileInfo in list)
// {
// // 改文件内容
// var oldContents = File.ReadAllText(fileInfo.FullName, encoding);
// var newContents = oldContents.CustomReplace(oldCompanyName, oldProjectName, companyName, projectName);
//
// // 文件名包含模板关键字
// if (fileInfo.Name.Contains(oldCompanyName)
// || fileInfo.Name.Contains(oldProjectName))
// {
// var oldFileName = fileInfo.Name;
// var newFileName = oldFileName.CustomReplace(oldCompanyName, oldProjectName, companyName, projectName);
//
// var newFilePath = Path.Combine(fileInfo.DirectoryName, newFileName);
// // 无变化才重命名
// if (newFilePath != fileInfo.FullName)
// {
// File.Delete(fileInfo.FullName);
// }
//
// File.WriteAllText(newFilePath, newContents, encoding);
// }
// else
// File.WriteAllText(fileInfo.FullName, newContents, encoding);
// }
//
// foreach (var subDirectory in Directory.GetDirectories(sourcePath))
// {
// RenameAllFileNameAndContent(subDirectory, oldCompanyName, oldProjectName, companyName, projectName, replaceSuffix);
// }
// }
private static void RenameAllFileNameAndContent(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName, private static void RenameAllFileNameAndContent(string sourcePath, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName,
string replaceSuffix) string replaceSuffix)
@ -171,23 +90,7 @@ public static class ReplaceHelper
RenameAllFileNameAndContent(subDirectory, oldCompanyName, oldProjectName, oldModuleName, companyName, projectName, moduleName, replaceSuffix); RenameAllFileNameAndContent(subDirectory, oldCompanyName, oldProjectName, oldModuleName, companyName, projectName, moduleName, replaceSuffix);
} }
} }
// private static string CustomReplace(this string content, string oldCompanyName, string oldProjectName, string companyName, string projectName)
// {
// var result = content.ReplacePackageReferenceBasicManagement()
// .ReplacePackageReferenceLanguageManagement()
// .ReplacePackageReferenceFileManagement()
// .ReplacePackageReferenceDataDictionaryManagement()
// .ReplacePackageReferenceNotificationManagement()
// .ReplacePackageReferenceCore();
//
// result = result
// .Replace(oldCompanyName, companyName)
// .Replace(oldProjectName, projectName)
// ;
//
// return result;
// }
private static string CustomReplace(this string content, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName) private static string CustomReplace(this string content, string oldCompanyName, string oldProjectName, string oldModuleName, string companyName, string projectName, string moduleName)
{ {

8
aspnet-core/frameworks/src/Lion.AbpPro.Cli/GlobalUsings.cs

@ -0,0 +1,8 @@
// Global using directives
global using Microsoft.Extensions.DependencyInjection;
global using Serilog;
global using Serilog.Events;
global using Volo.Abp;
global using Volo.Abp.Autofac;
global using Volo.Abp.Modularity;

11
aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/AbpProCliModule.cs

@ -1,13 +1,4 @@
using System.Threading.Tasks; namespace Lion.AbpPro.Cli;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Volo.Abp;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.Cli;
[DependsOn( [DependsOn(
typeof(Lion.AbpPro.Cli.AbpProCliCoreModule), typeof(Lion.AbpPro.Cli.AbpProCliCoreModule),

10
aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/Program.cs

@ -1,12 +1,4 @@
using System; namespace Lion.AbpPro.Cli;
using System.IO;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Serilog;
using Serilog.Events;
using Volo.Abp;
namespace Lion.AbpPro.Cli;
public class Program public class Program
{ {

3
aspnet-core/frameworks/src/Lion.AbpPro.Core/GlobalUsings.cs

@ -7,4 +7,5 @@ global using System.Globalization;
global using System.Text; global using System.Text;
global using System.Text.RegularExpressions; global using System.Text.RegularExpressions;
global using System.Web; global using System.Web;
global using Lion.AbpPro.Core; global using Lion.AbpPro.Core;
global using Volo.Abp.Modularity;

6
aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/AbpProCoreModule.cs

@ -0,0 +1,6 @@
namespace Lion.AbpPro.Core;
[DependsOn(typeof(AbpProLocalizationModule))]
public class AbpProCoreModule : AbpModule
{
}

8
aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/LionAbpProCoreModule.cs

@ -1,8 +0,0 @@
using Volo.Abp.Modularity;
namespace Lion.AbpPro.Core;
[DependsOn(typeof(LionAbpProLocalizationModule))]
public class LionAbpProCoreModule : AbpModule
{
}

2
aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/LionAbpProEntityFrameworkCoreMysqlModule.cs → aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/AbpProEntityFrameworkCoreMysqlModule.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro.EntityFrameworkCore.Mysql; namespace Lion.AbpPro.EntityFrameworkCore.Mysql;
[DependsOn(typeof(AbpEntityFrameworkCoreMySQLModule))] [DependsOn(typeof(AbpEntityFrameworkCoreMySQLModule))]
public class LionAbpProEntityFrameworkCoreMysqlModule : AbpModule public class AbpProEntityFrameworkCoreMysqlModule : AbpModule
{ {
} }

2
aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationConsts.cs → aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationConsts.cs

@ -1,6 +1,6 @@
namespace Lion.AbpPro; namespace Lion.AbpPro;
public class LionAbpProLocalizationConsts public class AbpProLocalizationConsts
{ {
/// <summary> /// <summary>
/// 名称空间 /// 名称空间

24
aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationModule.cs

@ -0,0 +1,24 @@
namespace Lion.AbpPro;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpLocalizationModule)
)]
public class AbpProLocalizationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options => { options.FileSets.AddEmbedded<AbpProLocalizationModule>(AbpProLocalizationConsts.NameSpace); });
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<AbpProLocalizationResource>(AbpProLocalizationConsts.DefaultCultureName)
.AddVirtualJson(AbpProLocalizationConsts.DefaultLocalizationResourceVirtualPath);
options.DefaultResourceType = typeof(AbpProLocalizationResource);
});
Configure<AbpExceptionLocalizationOptions>(options => { options.MapCodeNamespace(AbpProLocalizationConsts.NameSpace, typeof(AbpProLocalizationResource)); });
}
}

24
aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationModule.cs

@ -1,24 +0,0 @@
namespace Lion.AbpPro;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpLocalizationModule)
)]
public class LionAbpProLocalizationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options => { options.FileSets.AddEmbedded<LionAbpProLocalizationModule>(LionAbpProLocalizationConsts.NameSpace); });
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<LionAbpProLocalizationResource>(LionAbpProLocalizationConsts.DefaultCultureName)
.AddVirtualJson(LionAbpProLocalizationConsts.DefaultLocalizationResourceVirtualPath);
options.DefaultResourceType = typeof(LionAbpProLocalizationResource);
});
Configure<AbpExceptionLocalizationOptions>(options => { options.MapCodeNamespace(LionAbpProLocalizationConsts.NameSpace, typeof(LionAbpProLocalizationResource)); });
}
}

7
aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/AbpProLocalizationResource.cs

@ -0,0 +1,7 @@
namespace Lion.AbpPro.Localization;
[LocalizationResourceName("AbpProLocalizationResource")]
public class AbpProLocalizationResource
{
}

7
aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/LionAbpProLocalizationResource.cs

@ -1,7 +0,0 @@
namespace Lion.AbpPro.Localization;
[LocalizationResourceName("LionAbpProLocalizationResource")]
public class LionAbpProLocalizationResource
{
}

2
aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBase.cs → aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBase.cs

@ -3,7 +3,7 @@ using Volo.Abp.Testing;
namespace Lion.AbpPro.Core.Cli namespace Lion.AbpPro.Core.Cli
{ {
public abstract class LionAbpProCoreCliTestBase : AbpIntegratedTest<LionAbpProCoreCliTestBaseModule> public abstract class AbpProCoreCliTestBase : AbpIntegratedTest<AbpProCoreCliTestBaseModule>
{ {
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{ {

7
aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBaseModule.cs → aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBaseModule.cs

@ -1,19 +1,18 @@
using Lion.AbpPro.Cli; using Lion.AbpPro.Cli;
using Lion.AbpPro.Cli.Options;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using LionAbpProOptions = Lion.AbpPro.Cli.Options.LionAbpProOptions;
namespace Lion.AbpPro.Core.Cli namespace Lion.AbpPro.Core.Cli
{ {
[DependsOn(typeof(AbpTestBaseModule), [DependsOn(typeof(AbpTestBaseModule),
typeof(AbpProCliCoreModule))] typeof(AbpProCliCoreModule))]
public class LionAbpProCoreCliTestBaseModule : AbpModule public class AbpProCoreCliTestBaseModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<LionAbpProOptions>(options => Configure<AbpProCliOptions>(options =>
{ {
options.Owner = "WangJunZzz"; options.Owner = "WangJunZzz";
options.RepositoryId = "abp-vnext-pro"; options.RepositoryId = "abp-vnext-pro";

32
aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProManagerTests.cs

@ -0,0 +1,32 @@
using Lion.AbpPro.Cli.Github;
using Shouldly;
using Xunit;
namespace Lion.AbpPro.Core.Cli;
public sealed class AbpProManagerTests : AbpProCoreCliTestBase
{
private readonly IAbpProManager _abpProManager;
public AbpProManagerTests()
{
_abpProManager = GetRequiredService<IAbpProManager>();
}
[Fact]
public async Task GetLatestSourceCodeVersionAsync()
{
var result= await _abpProManager.GetLatestSourceCodeVersionAsync();
result.ShouldBe("7.2.2.3");
}
[Fact]
public async Task CheckSourceCodeVersionAsync()
{
var result= await _abpProManager.CheckSourceCodeVersionAsync("7.2.2.3");
result.ShouldBe(true);
var result1= await _abpProManager.CheckSourceCodeVersionAsync("1.2.2.3");
result1.ShouldBe(false);
}
}

32
aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProManagerTests.cs

@ -1,32 +0,0 @@
using Lion.AbpPro.Cli.Github;
using Shouldly;
using Xunit;
namespace Lion.AbpPro.Core.Cli;
public sealed class LionAbpProManagerTests : LionAbpProCoreCliTestBase
{
private readonly ILionAbpProManager _lionAbpProManager;
public LionAbpProManagerTests()
{
_lionAbpProManager = GetRequiredService<ILionAbpProManager>();
}
[Fact]
public async Task GetLatestSourceCodeVersionAsync()
{
var result= await _lionAbpProManager.GetLatestSourceCodeVersionAsync();
result.ShouldBe("7.2.2.3");
}
[Fact]
public async Task CheckSourceCodeVersionAsync()
{
var result= await _lionAbpProManager.CheckSourceCodeVersionAsync("7.2.2.3");
result.ShouldBe(true);
var result1= await _lionAbpProManager.CheckSourceCodeVersionAsync("1.2.2.3");
result1.ShouldBe(false);
}
}

2
aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBase.cs → aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBase.cs

@ -3,7 +3,7 @@ using Volo.Abp.Testing;
namespace Lion.AbpPro.Core namespace Lion.AbpPro.Core
{ {
public abstract class LionAbpProTestBase : AbpIntegratedTest<LionAbpProTestBaseModule> public abstract class AbpProTestBase : AbpIntegratedTest<AbpProTestBaseModule>
{ {
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{ {

2
aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBaseModule.cs → aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBaseModule.cs

@ -6,7 +6,7 @@ namespace Lion.AbpPro.Core
{ {
[DependsOn(typeof(AbpTestBaseModule), [DependsOn(typeof(AbpTestBaseModule),
typeof(AbpAutofacModule))] typeof(AbpAutofacModule))]
public class LionAbpProTestBaseModule : AbpModule public class AbpProTestBaseModule : AbpModule
{ {
} }
} }

2
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/TestsModule.cs

@ -103,7 +103,7 @@ namespace Lion.AbpPro.EntityFrameworkCore.Tests;
typeof(AbpSettingManagementHttpApiModule), typeof(AbpSettingManagementHttpApiModule),
typeof(AbpSettingManagementWebModule), typeof(AbpSettingManagementWebModule),
typeof(LionAbpProEntityFrameworkCoreMysqlModule) typeof(AbpProEntityFrameworkCoreMysqlModule)
)] )]
public class TestsModule : AbpModule public class TestsModule : AbpModule
{ {

2
aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBase.cs → aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBase.cs

@ -4,7 +4,7 @@ using Volo.Abp.Testing;
namespace Lion.AbpPro namespace Lion.AbpPro
{ {
public abstract class LionAbpProLocalizationTestBase : AbpIntegratedTest<LionAbpProLocalizationTestBaseModule> public abstract class AbpProLocalizationTestBase : AbpIntegratedTest<AbpProLocalizationTestBaseModule>
{ {
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{ {

4
aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBaseModule.cs → aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBaseModule.cs

@ -4,9 +4,9 @@ using Volo.Abp.Modularity;
namespace Lion.AbpPro namespace Lion.AbpPro
{ {
[DependsOn(typeof(LionAbpProLocalizationModule))] [DependsOn(typeof(AbpProLocalizationModule))]
[DependsOn(typeof(AbpTestBaseModule))] [DependsOn(typeof(AbpTestBaseModule))]
public class LionAbpProLocalizationTestBaseModule : AbpModule public class AbpProLocalizationTestBaseModule : AbpModule
{ {
} }
} }

8
aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTests.cs → aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTests.cs

@ -6,13 +6,13 @@ using Xunit;
namespace Lion.AbpPro namespace Lion.AbpPro
{ {
public sealed class LionAbpProLocalizationTests : LionAbpProLocalizationTestBase public sealed class AbpProLocalizationTests : AbpProLocalizationTestBase
{ {
private readonly IStringLocalizer<LionAbpProLocalizationResource> _stringLocalizer; private readonly IStringLocalizer<AbpProLocalizationResource> _stringLocalizer;
public LionAbpProLocalizationTests() public AbpProLocalizationTests()
{ {
_stringLocalizer = GetRequiredService<IStringLocalizer<LionAbpProLocalizationResource>>(); _stringLocalizer = GetRequiredService<IStringLocalizer<AbpProLocalizationResource>>();
} }
[Fact] [Fact]

2
aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/BasicManagementDomainSharedModule.cs

@ -10,7 +10,7 @@ namespace Lion.AbpPro.BasicManagement;
typeof(AbpPermissionManagementDomainSharedModule), typeof(AbpPermissionManagementDomainSharedModule),
typeof(AbpSettingManagementDomainSharedModule), typeof(AbpSettingManagementDomainSharedModule),
typeof(AbpTenantManagementDomainSharedModule), typeof(AbpTenantManagementDomainSharedModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class BasicManagementDomainSharedModule : AbpModule public class BasicManagementDomainSharedModule : AbpModule
{ {

2
aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs

@ -4,7 +4,7 @@ namespace Lion.AbpPro.DataDictionaryManagement
{ {
[DependsOn( [DependsOn(
typeof(AbpValidationModule), typeof(AbpValidationModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class DataDictionaryManagementDomainSharedModule : AbpModule public class DataDictionaryManagementDomainSharedModule : AbpModule
{ {

2
aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/FileManagementDomainSharedModule.cs

@ -4,7 +4,7 @@ namespace Lion.AbpPro.FileManagement;
[DependsOn( [DependsOn(
typeof(AbpValidationModule), typeof(AbpValidationModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class FileManagementDomainSharedModule : AbpModule public class FileManagementDomainSharedModule : AbpModule
{ {

2
aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs

@ -4,7 +4,7 @@ namespace Lion.AbpPro.LanguageManagement
{ {
[DependsOn( [DependsOn(
typeof(AbpValidationModule), typeof(AbpValidationModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class LanguageManagementDomainSharedModule : AbpModule public class LanguageManagementDomainSharedModule : AbpModule
{ {

2
aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs

@ -8,7 +8,7 @@ namespace Lion.AbpPro.NotificationManagement;
typeof(AbpCachingStackExchangeRedisModule), typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpAspNetCoreSerilogModule), typeof(AbpAspNetCoreSerilogModule),
typeof(AbpSwashbuckleModule), typeof(AbpSwashbuckleModule),
typeof(LionAbpProCapModule), typeof(AbpProCapModule),
typeof(AbpEntityFrameworkCoreMySQLModule) typeof(AbpEntityFrameworkCoreMySQLModule)
)] )]
public class NotificationManagementHttpApiHostModule : AbpModule public class NotificationManagementHttpApiHostModule : AbpModule

2
aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs

@ -4,7 +4,7 @@ namespace Lion.AbpPro.NotificationManagement
{ {
[DependsOn( [DependsOn(
typeof(AbpValidationModule), typeof(AbpValidationModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class NotificationManagementDomainSharedModule : AbpModule public class NotificationManagementDomainSharedModule : AbpModule
{ {

8
aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs

@ -16,8 +16,8 @@ namespace Lion.AbpPro
typeof(AbpAspNetCoreSerilogModule), typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAccountWebModule), typeof(AbpAccountWebModule),
typeof(AbpProApplicationModule), typeof(AbpProApplicationModule),
typeof(LionAbpProCapModule), typeof(AbpProCapModule),
typeof(LionAbpProCapEntityFrameworkCoreModule), typeof(AbpProCapEntityFrameworkCoreModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpCachingStackExchangeRedisModule), typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpBackgroundJobsHangfireModule) typeof(AbpBackgroundJobsHangfireModule)
@ -243,7 +243,7 @@ namespace Lion.AbpPro
options.MapType<FileContentResult>(() => new OpenApiSchema() { Type = "file" }); options.MapType<FileContentResult>(() => new OpenApiSchema() { Type = "file" });
options.SwaggerDoc("AbpPro", options.SwaggerDoc("AbpPro",
new OpenApiInfo { Title = "LionAbpPro API", Version = "v1" }); new OpenApiInfo { Title = "AbpPro API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true); options.DocInclusionPredicate((docName, description) => true);
options.EnableAnnotations(); // 启用注解 options.EnableAnnotations(); // 启用注解
options.DocumentFilter<HiddenAbpDefaultApiFilter>(); options.DocumentFilter<HiddenAbpDefaultApiFilter>();
@ -324,7 +324,7 @@ namespace Lion.AbpPro
capOptions.UseDashboard(options => capOptions.UseDashboard(options =>
{ {
options.UseAuth = auth; options.UseAuth = auth;
options.AuthorizationPolicy = LionAbpProCapPermissions.CapManagement.Cap; options.AuthorizationPolicy = AbpProCapPermissions.CapManagement.Cap;
}); });
}); });
} }

2
aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs

@ -6,7 +6,7 @@ using Lion.AbpPro.LanguageManagement;
namespace Lion.AbpPro namespace Lion.AbpPro
{ {
[DependsOn( [DependsOn(
typeof(LionAbpProCoreModule), typeof(AbpProCoreModule),
typeof(BasicManagementDomainSharedModule), typeof(BasicManagementDomainSharedModule),
typeof(DataDictionaryManagementDomainSharedModule), typeof(DataDictionaryManagementDomainSharedModule),
typeof(NotificationManagementDomainSharedModule), typeof(NotificationManagementDomainSharedModule),

2
aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs

@ -8,7 +8,7 @@ namespace Lion.AbpPro;
[DependsOn( [DependsOn(
typeof(AbpSwashbuckleModule), typeof(AbpSwashbuckleModule),
typeof(AbpAutofacModule), typeof(AbpAutofacModule),
typeof(LionAbpProCoreModule))] typeof(AbpProCoreModule))]
public class SharedHostingMicroserviceModule : AbpModule public class SharedHostingMicroserviceModule : AbpModule
{ {
private const string DefaultCorsPolicyName = "Default"; private const string DefaultCorsPolicyName = "Default";

2
templates/abp-vnext-pro-nuget-all/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs

@ -10,7 +10,7 @@ namespace MyCompanyName.MyProjectName
typeof(BasicManagementDomainSharedModule), typeof(BasicManagementDomainSharedModule),
typeof(NotificationManagementDomainSharedModule), typeof(NotificationManagementDomainSharedModule),
typeof(DataDictionaryManagementDomainSharedModule), typeof(DataDictionaryManagementDomainSharedModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class MyProjectNameDomainSharedModule : AbpModule public class MyProjectNameDomainSharedModule : AbpModule
{ {

2
templates/abp-vnext-pro-nuget-module/src/MyCompanyName.MyProjectName.MyModuleName.Domain.Shared/MyModuleNameDomainSharedModule.cs

@ -4,7 +4,7 @@ namespace MyCompanyName.MyProjectName.MyModuleName
{ {
[DependsOn( [DependsOn(
typeof(AbpValidationModule), typeof(AbpValidationModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class MyModuleNameDomainSharedModule : AbpModule public class MyModuleNameDomainSharedModule : AbpModule
{ {

2
templates/abp-vnext-pro-nuget-simplify/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs

@ -10,7 +10,7 @@ namespace MyCompanyName.MyProjectName
typeof(BasicManagementDomainSharedModule), typeof(BasicManagementDomainSharedModule),
typeof(NotificationManagementDomainSharedModule), typeof(NotificationManagementDomainSharedModule),
typeof(DataDictionaryManagementDomainSharedModule), typeof(DataDictionaryManagementDomainSharedModule),
typeof(LionAbpProCoreModule) typeof(AbpProCoreModule)
)] )]
public class MyProjectNameDomainSharedModule : AbpModule public class MyProjectNameDomainSharedModule : AbpModule
{ {

Loading…
Cancel
Save