From 0d1d9da8ccd808c1797a0041534f048e5c75810b Mon Sep 17 00:00:00 2001 From: wangjun Date: Mon, 3 Jul 2023 11:43:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E6=89=80=E6=9C=89?= =?UTF-8?q?=E7=B1=BB=E5=90=8D=E7=9A=84Lion=E5=89=8D=E7=BC=80,=E6=AF=94?= =?UTF-8?q?=E5=A6=82LionAbpProCliModule=E4=BF=AE=E6=94=B9=E4=B8=BAAbpProCl?= =?UTF-8?q?iModule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aspnet-core/Lion.AbpPro.All.sln | 35 ++++++ .../GlobalUsings.cs | 1 + ... AbpProAbpProCapDbProviderInfoProvider.cs} | 20 ++-- ...iderInfo.cs => AbpProCapDbProviderInfo.cs} | 4 +- .../AbpProCapEntityFrameworkCoreModule.cs | 7 ++ ...sions.cs => AbpProCapOptionsExtensions.cs} | 6 +- ....cs => AbpProEfCoreDbContextCapOptions.cs} | 2 +- ...pProEfCoreDbContextCapOptionsExtension.cs} | 4 +- ...> EfCoreAbpProCapTransactionApiFactory.cs} | 16 +-- .../IAbpProCapDbProviderInfoProvider.cs | 6 ++ .../ILionAbpProCapDbProviderInfoProvider.cs | 6 -- .../LionAbpProCapEntityFrameworkCoreModule.cs | 7 -- .../src/Lion.AbpPro.CAP/GlobalUsings.cs | 10 +- ...cs => AbpProCapConsumerServiceSelector.cs} | 4 +- ...Bus.cs => AbpProCapDistributedEventBus.cs} | 6 +- ...nAbpProCapModule.cs => AbpProCapModule.cs} | 4 +- .../AbpProCapPermissionDefinitionProvider.cs | 16 +++ ...Permissions.cs => AbpProCapPermissions.cs} | 2 +- ...sion.cs => AbpProCapPublisherExtension.cs} | 2 +- .../AbpProCapServiceCollectionExtensions.cs | 13 +++ ...apUnitOfWork.cs => AbpProCapUnitOfWork.cs} | 6 +- ...nSerializer.cs => AbpProJsonSerializer.cs} | 12 +-- ....cs => IAbpProCapTransactionApiFactory.cs} | 2 +- ...onAbpProCapPermissionDefinitionProvider.cs | 19 ---- ...ionAbpProCapServiceCollectionExtensions.cs | 23 ---- .../src/Lion.AbpPro.Cli.Core/GlobalUsings.cs | 10 +- .../Lion/AbpPro/Cli/AbpProCliCoreModule.cs | 18 ++-- .../Lion/AbpPro/Cli/Args/CommandLineArgs.cs | 4 +- .../Lion/AbpPro/Cli/CliService.cs | 5 +- .../Lion/AbpPro/Cli/Commands/NewCommand.cs | 19 ++-- ...{LionAbpProManager.cs => AbpProManager.cs} | 22 ++-- ...LionAbpProManager.cs => IAbpProManager.cs} | 2 +- .../Lion/AbpPro/Cli/NuGet/NuGetService.cs | 5 +- ...onAbpProOptions.cs => AbpProCliOptions.cs} | 4 +- ...ateOptions.cs => AbpProTemplateOptions.cs} | 4 +- .../Cli/SourceCode/SourceCodeManager.cs | 22 ++-- .../Lion/AbpPro/Cli/Utils/CmdHelper.cs | 5 +- .../Lion/AbpPro/Cli/Utils/ReplaceHelper.cs | 101 +----------------- .../src/Lion.AbpPro.Cli/GlobalUsings.cs | 8 ++ .../Lion/AbpPro/Cli/AbpProCliModule.cs | 11 +- .../Lion/AbpPro/Cli/Program.cs | 10 +- .../src/Lion.AbpPro.Core/GlobalUsings.cs | 3 +- .../Lion/AbpPro/Core/AbpProCoreModule.cs | 6 ++ .../Lion/AbpPro/Core/LionAbpProCoreModule.cs | 8 -- ...> AbpProEntityFrameworkCoreMysqlModule.cs} | 2 +- ...nConsts.cs => AbpProLocalizationConsts.cs} | 2 +- .../Lion/AbpPro/AbpProLocalizationModule.cs | 24 +++++ .../AbpPro/LionAbpProLocalizationModule.cs | 24 ----- .../AbpProLocalizationResource.cs | 7 ++ .../LionAbpProLocalizationResource.cs | 7 -- ...liTestBase.cs => AbpProCoreCliTestBase.cs} | 2 +- ...dule.cs => AbpProCoreCliTestBaseModule.cs} | 7 +- .../AbpPro/Core/Cli/AbpProManagerTests.cs | 32 ++++++ .../AbpPro/Core/Cli/LionAbpProManagerTests.cs | 32 ------ ...ionAbpProTestBase.cs => AbpProTestBase.cs} | 2 +- ...tBaseModule.cs => AbpProTestBaseModule.cs} | 2 +- .../TestsModule.cs | 2 +- ...tBase.cs => AbpProLocalizationTestBase.cs} | 2 +- ...cs => AbpProLocalizationTestBaseModule.cs} | 4 +- ...ionTests.cs => AbpProLocalizationTests.cs} | 8 +- .../BasicManagementDomainSharedModule.cs | 2 +- ...aDictionaryManagementDomainSharedModule.cs | 2 +- .../FileManagementDomainSharedModule.cs | 2 +- .../LanguageManagementDomainSharedModule.cs | 2 +- ...NotificationManagementHttpApiHostModule.cs | 2 +- ...otificationManagementDomainSharedModule.cs | 2 +- .../AbpProHttpApiHostModule.cs | 8 +- .../AbpProDomainSharedModule.cs | 2 +- .../AbpPro/SharedHostingMicroserviceModule.cs | 2 +- .../MyProjectNameDomainSharedModule.cs | 2 +- .../MyModuleNameDomainSharedModule.cs | 2 +- .../MyProjectNameDomainSharedModule.cs | 2 +- 72 files changed, 297 insertions(+), 392 deletions(-) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/{LionAbpProLionAbpProCapDbProviderInfoProvider.cs => AbpProAbpProCapDbProviderInfoProvider.cs} (70%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/{LionAbpProCapDbProviderInfo.cs => AbpProCapDbProviderInfo.cs} (68%) create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapEntityFrameworkCoreModule.cs rename aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/{LionAbpProCapOptionsExtensions.cs => AbpProCapOptionsExtensions.cs} (66%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/{LionAbpProEfCoreDbContextCapOptions.cs => AbpProEfCoreDbContextCapOptions.cs} (68%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/{LionAbpProEfCoreDbContextCapOptionsExtension.cs => AbpProEfCoreDbContextCapOptionsExtension.cs} (64%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/{EfCoreLionAbpProCapTransactionApiFactory.cs => EfCoreAbpProCapTransactionApiFactory.cs} (73%) create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/IAbpProCapDbProviderInfoProvider.cs delete mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/ILionAbpProCapDbProviderInfoProvider.cs delete mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapEntityFrameworkCoreModule.cs rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{LionAbpProCapConsumerServiceSelector.cs => AbpProCapConsumerServiceSelector.cs} (93%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{LionAbpProCapDistributedEventBus.cs => AbpProCapDistributedEventBus.cs} (95%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{LionAbpProCapModule.cs => AbpProCapModule.cs} (55%) create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissionDefinitionProvider.cs rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{LionAbpProCapPermissions.cs => AbpProCapPermissions.cs} (81%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{LionAbpProCapPublisherExtension.cs => AbpProCapPublisherExtension.cs} (87%) create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{LionAbpProCapUnitOfWork.cs => AbpProCapUnitOfWork.cs} (88%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{LionAbpProJsonSerializer.cs => AbpProJsonSerializer.cs} (84%) rename aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/{ILionAbpProCapTransactionApiFactory.cs => IAbpProCapTransactionApiFactory.cs} (70%) delete mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissionDefinitionProvider.cs delete mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapServiceCollectionExtensions.cs rename aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/{LionAbpProManager.cs => AbpProManager.cs} (65%) rename aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/{ILionAbpProManager.cs => IAbpProManager.cs} (91%) rename aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/{LionAbpProOptions.cs => AbpProCliOptions.cs} (84%) rename aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/{LionAbpProTemplateOptions.cs => AbpProTemplateOptions.cs} (87%) create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Cli/GlobalUsings.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/AbpProCoreModule.cs delete mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/LionAbpProCoreModule.cs rename aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/{LionAbpProEntityFrameworkCoreMysqlModule.cs => AbpProEntityFrameworkCoreMysqlModule.cs} (62%) rename aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/{LionAbpProLocalizationConsts.cs => AbpProLocalizationConsts.cs} (90%) create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationModule.cs delete mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationModule.cs create mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/AbpProLocalizationResource.cs delete mode 100644 aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/LionAbpProLocalizationResource.cs rename aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/{LionAbpProCoreCliTestBase.cs => AbpProCoreCliTestBase.cs} (69%) rename aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/{LionAbpProCoreCliTestBaseModule.cs => AbpProCoreCliTestBaseModule.cs} (73%) create mode 100644 aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProManagerTests.cs delete mode 100644 aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProManagerTests.cs rename aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/{LionAbpProTestBase.cs => AbpProTestBase.cs} (72%) rename aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/{LionAbpProTestBaseModule.cs => AbpProTestBaseModule.cs} (77%) rename aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/{LionAbpProLocalizationTestBase.cs => AbpProLocalizationTestBase.cs} (67%) rename aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/{LionAbpProLocalizationTestBaseModule.cs => AbpProLocalizationTestBaseModule.cs} (51%) rename aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/{LionAbpProLocalizationTests.cs => AbpProLocalizationTests.cs} (71%) diff --git a/aspnet-core/Lion.AbpPro.All.sln b/aspnet-core/Lion.AbpPro.All.sln index 912c8da3..66b78632 100644 --- a/aspnet-core/Lion.AbpPro.All.sln +++ b/aspnet-core/Lion.AbpPro.All.sln @@ -388,6 +388,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lion.AbpPro.Core.Cli.Tests" 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}" 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 GlobalSection(SolutionConfigurationPlatforms) = preSolution 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}.Release|Any CPU.ActiveCfg = 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 GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1093,6 +1123,11 @@ Global {2DDC4639-710D-4B9C-98E0-03288184B37C} = {18E9B97A-3897-4DA8-810E-4435A777ABA7} {9B65C2C8-E94E-46FD-9841-70DFAE5C85E9} = {EFC415F8-872F-4C7E-8645-31A51481BCFC} {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 GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/GlobalUsings.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/GlobalUsings.cs index 8b553ee8..49d4feab 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/GlobalUsings.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/GlobalUsings.cs @@ -2,6 +2,7 @@ global using System.Collections.Concurrent; global using DotNetCore.CAP; +global using Lion.AbpPro.CAP.EntityFrameworkCore; global using Microsoft.EntityFrameworkCore; global using Microsoft.EntityFrameworkCore.Storage; global using Microsoft.Extensions.DependencyInjection; diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProLionAbpProCapDbProviderInfoProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProAbpProCapDbProviderInfoProvider.cs similarity index 70% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProLionAbpProCapDbProviderInfoProvider.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProAbpProCapDbProviderInfoProvider.cs index ec610c22..d7594c72 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProLionAbpProCapDbProviderInfoProvider.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProAbpProCapDbProviderInfoProvider.cs @@ -1,41 +1,41 @@ namespace Lion.AbpPro.CAP.EntityFrameworkCore; -public class LionAbpProLionAbpProCapDbProviderInfoProvider : ILionAbpProCapDbProviderInfoProvider, ITransientDependency +public class AbpProAbpProCapDbProviderInfoProvider : IAbpProCapDbProviderInfoProvider, ITransientDependency { - protected ConcurrentDictionary CapDbProviderInfos { get; set; } = new(); + protected ConcurrentDictionary CapDbProviderInfos { get; set; } = new(); - public virtual LionAbpProCapDbProviderInfo GetOrNull(string dbProviderName) + public virtual AbpProCapDbProviderInfo GetOrNull(string dbProviderName) { return CapDbProviderInfos.GetOrAdd(dbProviderName, InternalGetOrNull); } - protected virtual LionAbpProCapDbProviderInfo InternalGetOrNull(string databaseProviderName) + protected virtual AbpProCapDbProviderInfo InternalGetOrNull(string databaseProviderName) { switch (databaseProviderName) { case "Microsoft.EntityFrameworkCore.SqlServer": - return new LionAbpProCapDbProviderInfo( + return new AbpProCapDbProviderInfo( "DotNetCore.CAP.SqlServerCapTransaction, DotNetCore.CAP.SqlServer", "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.SqlServer"); case "Npgsql.EntityFrameworkCore.PostgreSQL": - return new LionAbpProCapDbProviderInfo( + return new AbpProCapDbProviderInfo( "DotNetCore.CAP.PostgreSqlCapTransaction, DotNetCore.CAP.PostgreSql", "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.PostgreSQL"); case "Pomelo.EntityFrameworkCore.MySql": - return new LionAbpProCapDbProviderInfo( + return new AbpProCapDbProviderInfo( "DotNetCore.CAP.MySqlCapTransaction, DotNetCore.CAP.MySql", "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.MySql"); case "Oracle.EntityFrameworkCore": case "Devart.Data.Oracle.Entity.EFCore": - return new LionAbpProCapDbProviderInfo( + return new AbpProCapDbProviderInfo( "DotNetCore.CAP.OracleCapTransaction, DotNetCore.CAP.Oracle", "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.Oracle"); case "Microsoft.EntityFrameworkCore.Sqlite": - return new LionAbpProCapDbProviderInfo( + return new AbpProCapDbProviderInfo( "DotNetCore.CAP.SqliteCapTransaction, DotNetCore.CAP.Sqlite", "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.Sqlite"); case "Microsoft.EntityFrameworkCore.InMemory": - return new LionAbpProCapDbProviderInfo( + return new AbpProCapDbProviderInfo( "DotNetCore.CAP.InMemoryCapTransaction, DotNetCore.CAP.InMemoryStorage", "Microsoft.EntityFrameworkCore.Storage.CapEFDbTransaction, DotNetCore.CAP.InMemoryStorage"); default: diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapDbProviderInfo.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapDbProviderInfo.cs similarity index 68% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapDbProviderInfo.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapDbProviderInfo.cs index 1cce7116..cdf4ce89 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapDbProviderInfo.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapDbProviderInfo.cs @@ -1,12 +1,12 @@ namespace Lion.AbpPro.CAP.EntityFrameworkCore; -public class LionAbpProCapDbProviderInfo +public class AbpProCapDbProviderInfo { public Type CapTransactionType { get; } public Type CapEfDbTransactionType { get; } - public LionAbpProCapDbProviderInfo(string capTransactionTypeName, string capEfDbTransactionTypeName) + public AbpProCapDbProviderInfo(string capTransactionTypeName, string capEfDbTransactionTypeName) { CapTransactionType = Type.GetType(capTransactionTypeName, false); CapEfDbTransactionType = Type.GetType(capEfDbTransactionTypeName, false); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapEntityFrameworkCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapEntityFrameworkCoreModule.cs new file mode 100644 index 00000000..27afc584 --- /dev/null +++ b/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 + { + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapOptionsExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapOptionsExtensions.cs similarity index 66% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapOptionsExtensions.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProCapOptionsExtensions.cs index 43f219f1..04c67889 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapOptionsExtensions.cs +++ b/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 namespace Microsoft.Extensions.DependencyInjection { - public static class LionAbpProCapOptionsExtensions + public static class AbpProCapOptionsExtensions { public static CapOptions SetCapDbConnectionString(this CapOptions options, string dbConnectionString) { - options.RegisterExtension(new LionAbpProEfCoreDbContextCapOptionsExtension + options.RegisterExtension(new AbpProEfCoreDbContextCapOptionsExtension { CapUsingDbConnectionString = dbConnectionString }); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptions.cs similarity index 68% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptions.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptions.cs index bc30551d..0065be94 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptions.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptions.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.CAP.EntityFrameworkCore; -public class LionAbpProEfCoreDbContextCapOptions +public class AbpProEfCoreDbContextCapOptions { public string CapUsingDbConnectionString { get; set; } } \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptionsExtension.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptionsExtension.cs similarity index 64% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptionsExtension.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptionsExtension.cs index b28a1f07..99c9d5fc 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProEfCoreDbContextCapOptionsExtension.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/AbpProEfCoreDbContextCapOptionsExtension.cs @@ -1,12 +1,12 @@ namespace Lion.AbpPro.CAP.EntityFrameworkCore; -public class LionAbpProEfCoreDbContextCapOptionsExtension : ICapOptionsExtension +public class AbpProEfCoreDbContextCapOptionsExtension : ICapOptionsExtension { public string CapUsingDbConnectionString { get; init; } public void AddServices(IServiceCollection services) { - services.Configure(options => + services.Configure(options => { options.CapUsingDbConnectionString = CapUsingDbConnectionString; }); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreLionAbpProCapTransactionApiFactory.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreAbpProCapTransactionApiFactory.cs similarity index 73% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreLionAbpProCapTransactionApiFactory.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreAbpProCapTransactionApiFactory.cs index 6fcefd26..71482e3a 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreLionAbpProCapTransactionApiFactory.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/EfCoreAbpProCapTransactionApiFactory.cs @@ -1,23 +1,23 @@ namespace Lion.AbpPro.CAP.EntityFrameworkCore; -public class EfCoreLionAbpProCapTransactionApiFactory : ILionAbpProCapTransactionApiFactory, ITransientDependency +public class EfCoreAbpProCapTransactionApiFactory : IAbpProCapTransactionApiFactory, ITransientDependency { public Type TransactionApiType { get; } = typeof(EfCoreTransactionApi); protected readonly ICapPublisher Publisher; - protected readonly LionAbpProEfCoreDbContextCapOptions Options; - protected readonly ILionAbpProCapDbProviderInfoProvider LionAbpProCapDbProviderInfoProvider; + protected readonly AbpProEfCoreDbContextCapOptions Options; + protected readonly IAbpProCapDbProviderInfoProvider AbpProCapDbProviderInfoProvider; protected readonly ICancellationTokenProvider CancellationTokenProvider; - public EfCoreLionAbpProCapTransactionApiFactory( + public EfCoreAbpProCapTransactionApiFactory( ICapPublisher publisher, - IOptions options, - ILionAbpProCapDbProviderInfoProvider lionAbpProCapDbProviderInfoProvider, + IOptions options, + IAbpProCapDbProviderInfoProvider abpProCapDbProviderInfoProvider, ICancellationTokenProvider cancellationTokenProvider) { Publisher = publisher; Options = options.Value; - LionAbpProCapDbProviderInfoProvider = lionAbpProCapDbProviderInfoProvider; + AbpProCapDbProviderInfoProvider = abpProCapDbProviderInfoProvider; CancellationTokenProvider = cancellationTokenProvider; } @@ -40,7 +40,7 @@ public class EfCoreLionAbpProCapTransactionApiFactory : ILionAbpProCapTransactio // 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) { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/IAbpProCapDbProviderInfoProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/IAbpProCapDbProviderInfoProvider.cs new file mode 100644 index 00000000..5c43ba0d --- /dev/null +++ b/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); +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/ILionAbpProCapDbProviderInfoProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/ILionAbpProCapDbProviderInfoProvider.cs deleted file mode 100644 index f6aed69f..00000000 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/ILionAbpProCapDbProviderInfoProvider.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Lion.AbpPro.CAP.EntityFrameworkCore; - -public interface ILionAbpProCapDbProviderInfoProvider -{ - LionAbpProCapDbProviderInfo GetOrNull(string dbProviderName); -} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapEntityFrameworkCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapEntityFrameworkCoreModule.cs deleted file mode 100644 index 787bba48..00000000 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP.EntityFrameworkCore/Lion/AbpPro/CAP/EntityFrameworkCore/LionAbpProCapEntityFrameworkCoreModule.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Lion.AbpPro.CAP.EntityFrameworkCore -{ - [DependsOn(typeof(LionAbpProCapModule))] - public class LionAbpProCapEntityFrameworkCoreModule : AbpModule - { - } -} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/GlobalUsings.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/GlobalUsings.cs index 2bb55f88..056c7aa6 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/GlobalUsings.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/GlobalUsings.cs @@ -1,3 +1,11 @@ // Global using directives -global using Volo.Abp.Authorization.Permissions; \ No newline at end of file +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; \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapConsumerServiceSelector.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapConsumerServiceSelector.cs similarity index 93% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapConsumerServiceSelector.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapConsumerServiceSelector.cs index 652e055e..30410308 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapConsumerServiceSelector.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapConsumerServiceSelector.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.CAP; -public class LionAbpProCapConsumerServiceSelector : ConsumerServiceSelector, ISingletonDependency +public class AbpProCapConsumerServiceSelector : ConsumerServiceSelector, ISingletonDependency { protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } protected IServiceProvider ServiceProvider { get; } @@ -8,7 +8,7 @@ public class LionAbpProCapConsumerServiceSelector : ConsumerServiceSelector, ISi /// /// Creates a new . /// - public LionAbpProCapConsumerServiceSelector(IServiceProvider serviceProvider, IOptions distributedEventBusOptions) : base(serviceProvider) + public AbpProCapConsumerServiceSelector(IServiceProvider serviceProvider, IOptions distributedEventBusOptions) : base(serviceProvider) { ServiceProvider = serviceProvider; AbpDistributedEventBusOptions = distributedEventBusOptions.Value; diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapDistributedEventBus.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapDistributedEventBus.cs similarity index 95% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapDistributedEventBus.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapDistributedEventBus.cs index 337a9c3f..a270004b 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapDistributedEventBus.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapDistributedEventBus.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.CAP; -public class LionAbpProCapDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency +public class AbpProCapDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency { protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } protected readonly ICapPublisher CapPublisher; @@ -9,7 +9,7 @@ public class LionAbpProCapDistributedEventBus : EventBusBase, IDistributedEventB protected ConcurrentDictionary> HandlerFactories { get; } protected ConcurrentDictionary EventTypes { get; } - public LionAbpProCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory, + public AbpProCapDistributedEventBus(IServiceScopeFactory serviceScopeFactory, IOptions distributedEventBusOptions, ICapPublisher capPublisher, IUnitOfWorkManager unitOfWorkManager, @@ -104,7 +104,7 @@ public class LionAbpProCapDistributedEventBus : EventBusBase, IDistributedEventB 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 () => { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapModule.cs similarity index 55% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapModule.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapModule.cs index c530c2a3..12b5c3a1 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapModule.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapModule.cs @@ -2,8 +2,8 @@ namespace Lion.AbpPro.CAP; [DependsOn( typeof(AbpEventBusModule), - typeof(LionAbpProLocalizationModule), + typeof(AbpProLocalizationModule), typeof(AbpUnitOfWorkModule))] -public class LionAbpProCapModule : AbpModule +public class AbpProCapModule : AbpModule { } \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissionDefinitionProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissionDefinitionProvider.cs new file mode 100644 index 00000000..68c4af75 --- /dev/null +++ b/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(name); + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissions.cs similarity index 81% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissions.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissions.cs index 0969e789..06c5d97c 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissions.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPermissions.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.CAP; -public static class LionAbpProCapPermissions +public static class AbpProCapPermissions { public static class CapManagement diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPublisherExtension.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPublisherExtension.cs similarity index 87% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPublisherExtension.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPublisherExtension.cs index c3d68dcf..2e1d66fa 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPublisherExtension.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapPublisherExtension.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.CAP; -public static class LionAbpProCapPublisherExtension +public static class AbpProCapPublisherExtension { public static IDisposable UseTransaction(this ICapPublisher capPublisher, ICapTransaction capTransaction) { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs new file mode 100644 index 00000000..a9c479be --- /dev/null +++ b/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 capAction) + { + context.Services.Replace(ServiceDescriptor.Transient()); + context.Services.Replace(ServiceDescriptor.Transient()); + context.Services.AddTransient(); + context.Services.AddCap(capAction); + return context; + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapUnitOfWork.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapUnitOfWork.cs similarity index 88% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapUnitOfWork.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapUnitOfWork.cs index 6e4bec2b..8e16efbd 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapUnitOfWork.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapUnitOfWork.cs @@ -1,13 +1,13 @@ namespace Lion.AbpPro.CAP; [Dependency(TryRegister = true)] -public class LionAbpProCapUnitOfWork : UnitOfWork +public class AbpProCapUnitOfWork : UnitOfWork { public ICapTransaction CapTransaction { get; protected set; } protected ICapPublisher CapPublisher { get; } - public LionAbpProCapUnitOfWork( + public AbpProCapUnitOfWork( IServiceProvider serviceProvider, IUnitOfWorkEventPublisher unitOfWorkEventPublisher, IOptions options, @@ -19,7 +19,7 @@ public class LionAbpProCapUnitOfWork : UnitOfWork public override void AddTransactionApi(string key, ITransactionApi api) { - var factories = ServiceProvider.GetServices(); + var factories = ServiceProvider.GetServices(); var factory = factories.FirstOrDefault(x => x.TransactionApiType == api.GetType()); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProJsonSerializer.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProJsonSerializer.cs similarity index 84% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProJsonSerializer.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProJsonSerializer.cs index 4d146194..e7c4e266 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProJsonSerializer.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProJsonSerializer.cs @@ -1,16 +1,10 @@ -using System.Text; -using System.Text.Json; -using DotNetCore.CAP.Messages; -using DotNetCore.CAP.Serialization; -using Volo.Abp.Json; +namespace Lion.AbpPro.CAP; -namespace Lion.AbpPro.CAP; - -public class LionAbpProJsonSerializer : ISerializer, ISingletonDependency +public class AbpProJsonSerializer : ISerializer, ISingletonDependency { private readonly IJsonSerializer _jsonSerializer; - public LionAbpProJsonSerializer(IJsonSerializer jsonSerializer) + public AbpProJsonSerializer(IJsonSerializer jsonSerializer) { _jsonSerializer = jsonSerializer; } diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/ILionAbpProCapTransactionApiFactory.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/IAbpProCapTransactionApiFactory.cs similarity index 70% rename from aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/ILionAbpProCapTransactionApiFactory.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/IAbpProCapTransactionApiFactory.cs index 5f311061..be4f69c8 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/ILionAbpProCapTransactionApiFactory.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/IAbpProCapTransactionApiFactory.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.CAP; -public interface ILionAbpProCapTransactionApiFactory +public interface IAbpProCapTransactionApiFactory { Type TransactionApiType { get; } diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissionDefinitionProvider.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissionDefinitionProvider.cs deleted file mode 100644 index 7a23dc94..00000000 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapPermissionDefinitionProvider.cs +++ /dev/null @@ -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(name); - } -} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapServiceCollectionExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapServiceCollectionExtensions.cs deleted file mode 100644 index ea81c2ce..00000000 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/LionAbpProCapServiceCollectionExtensions.cs +++ /dev/null @@ -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 capAction) - { - // context.Services.AddSingleton(); - // context.Services.AddSingleton(); - // context.Services.AddSingleton(); - - context.Services.Replace(ServiceDescriptor.Transient()); - context.Services.Replace(ServiceDescriptor.Transient()); - context.Services.AddTransient(); - - context.Services.AddCap(capAction); - return context; - } -} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/GlobalUsings.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/GlobalUsings.cs index c7cf04de..ec7a63e8 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/GlobalUsings.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/GlobalUsings.cs @@ -1,13 +1,17 @@ // Global using directives +global using System.Diagnostics; global using System.Diagnostics.CodeAnalysis; global using System.Net; +global using System.Runtime.InteropServices; global using System.Text; global using ICSharpCode.SharpZipLib.Core; global using ICSharpCode.SharpZipLib.Zip; global using Lion.AbpPro.Cli.Args; +global using Lion.AbpPro.Cli.Commands; global using Lion.AbpPro.Cli.Github; global using Lion.AbpPro.Cli.Options; +global using Lion.AbpPro.Cli.SourceCode; global using Lion.AbpPro.Cli.Utils; global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.Logging; @@ -17,4 +21,8 @@ global using Polly; global using Polly.Retry; global using Volo.Abp; global using Volo.Abp.DependencyInjection; -global using Volo.Abp.IO; \ No newline at end of file +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; \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs index cfbe255b..e7984aa0 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/AbpProCliCoreModule.cs @@ -1,8 +1,4 @@ -using Lion.AbpPro.Cli.Commands; -using Volo.Abp.Domain; -using Volo.Abp.Modularity; - -namespace Lion.AbpPro.Cli; +namespace Lion.AbpPro.Cli; [DependsOn( typeof(AbpDddDomainModule) @@ -14,28 +10,28 @@ public class AbpProCliCoreModule : AbpModule Configure(options => { options.Commands[HelpCommand.Name] = typeof(HelpCommand); }); Configure(options => { options.Commands[NewCommand.Name] = typeof(NewCommand); }); - Configure(options => + Configure(options => { options.Owner = "WangJunZzz"; options.RepositoryId = "abp-vnext-pro"; options.Token = "abp-vnext-proghp_47vqiabp-vnext-provNkHKJguOJkdHvnxUabp-vnext-protij7Qbdn1Qy3fUabp-vnext-pro"; - options.Templates = new List() + options.Templates = new List() { - new LionAbpProTemplateOptions("abp-vnext-pro", "pro", "源码版本", true) + new AbpProTemplateOptions("abp-vnext-pro", "pro", "源码版本", true) { ExcludeFiles = "templates,docs,.github,LICENSE,Readme.md", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", OldCompanyName = "Lion", 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", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", OldCompanyName = "MyCompanyName", 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", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", @@ -43,7 +39,7 @@ public class AbpProCliCoreModule : AbpModule 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", ReplaceSuffix = ".sln,.csproj,.cs,.cshtml,.json,.ci,.yml,.yaml,.nswag,.DotSettings,.env", diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Args/CommandLineArgs.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Args/CommandLineArgs.cs index cbab9724..3dc20394 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Args/CommandLineArgs.cs +++ b/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 { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/CliService.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/CliService.cs index 76d949d7..8e2ff46d 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/CliService.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/CliService.cs @@ -1,7 +1,4 @@ -using Lion.AbpPro.Cli.Commands; -using Volo.Abp.Domain.Services; - -namespace Lion.AbpPro.Cli; +namespace Lion.AbpPro.Cli; public class CliService : DomainService { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs index ca41e633..b8f38535 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Commands/NewCommand.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -using Lion.AbpPro.Cli.SourceCode; - -namespace Lion.AbpPro.Cli.Commands; +namespace Lion.AbpPro.Cli.Commands; public class NewCommand : IConsoleCommand, ITransientDependency { @@ -9,20 +6,20 @@ public class NewCommand : IConsoleCommand, ITransientDependency private readonly ILogger _logger; private readonly AbpCliOptions _abpCliOptions; private readonly IServiceScopeFactory _serviceScopeFactory; - private readonly Options.LionAbpProOptions _options; + private readonly Options.AbpProCliOptions _cliOptions; private readonly ISourceCodeManager _sourceCodeManager; public NewCommand( IOptions abpCliOptions, ILogger logger, IServiceScopeFactory serviceScopeFactory, - IOptions options, + IOptions options, ISourceCodeManager sourceCodeManager) { _logger = logger; _serviceScopeFactory = serviceScopeFactory; _sourceCodeManager = sourceCodeManager; - _options = options.Value; + _cliOptions = options.Value; _abpCliOptions = abpCliOptions.Value; } @@ -40,7 +37,7 @@ public class NewCommand : IConsoleCommand, ITransientDependency return; } - var templateOptions = _options.Templates.FirstOrDefault(e => e.Name == template); + var templateOptions = _cliOptions.Templates.FirstOrDefault(e => e.Name == template); if (templateOptions == null) { _logger.LogError("模板类型不正确"); @@ -48,9 +45,9 @@ public class NewCommand : IConsoleCommand, ITransientDependency return; } - context.RepositoryId = _options.RepositoryId; - context.Token = _options.DecryptToken; - context.Owner = _options.Owner; + context.RepositoryId = _cliOptions.RepositoryId; + context.Token = _cliOptions.DecryptToken; + context.Owner = _cliOptions.Owner; context.TemplateName = templateOptions.Name; context.TemplateKey = templateOptions.Key; context.IsSource = templateOptions.IsSource; diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/LionAbpProManager.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/AbpProManager.cs similarity index 65% rename from aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/LionAbpProManager.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/AbpProManager.cs index 2d82157a..d604e3f9 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/LionAbpProManager.cs +++ b/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; -public class LionAbpProManager : ITransientDependency, ILionAbpProManager +public class AbpProManager : ITransientDependency, IAbpProManager { - private readonly LionAbpProOptions _options; + private readonly AbpProCliOptions _cliOptions; private readonly IHttpClientFactory _httpClientFactory; - public LionAbpProManager(IOptions options, IHttpClientFactory httpClientFactory) + public AbpProManager(IOptions options, IHttpClientFactory httpClientFactory) { _httpClientFactory = httpClientFactory; - _options = options.Value; + _cliOptions = options.Value; } /// @@ -18,13 +18,13 @@ public class LionAbpProManager : ITransientDependency, ILionAbpProManager /// public async Task GetLatestSourceCodeVersionAsync() { - var github = new GitHubClient(new ProductHeaderValue(_options.RepositoryId)) + var github = new GitHubClient(new ProductHeaderValue(_cliOptions.RepositoryId)) { // 匿名访问,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; } @@ -35,13 +35,13 @@ public class LionAbpProManager : ITransientDependency, ILionAbpProManager { try { - var github = new GitHubClient(new ProductHeaderValue(_options.RepositoryId)) + var github = new GitHubClient(new ProductHeaderValue(_cliOptions.RepositoryId)) { // 匿名访问,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; } catch @@ -56,7 +56,7 @@ public class LionAbpProManager : ITransientDependency, ILionAbpProManager public async Task DownloadAsync(string version, string outputPath) { 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); DirectoryHelper.CreateIfNotExists(CliPaths.TemplateCache); var content = await response.Content.ReadAsByteArrayAsync(); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/ILionAbpProManager.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/IAbpProManager.cs similarity index 91% rename from aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/ILionAbpProManager.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/IAbpProManager.cs index c6d42558..975b8723 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/ILionAbpProManager.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Github/IAbpProManager.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.Cli.Github; -public interface ILionAbpProManager +public interface IAbpProManager { /// /// 获取最后一个版本 diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/NuGet/NuGetService.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/NuGet/NuGetService.cs index d29a5272..5a2cfd07 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/NuGet/NuGetService.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/NuGet/NuGetService.cs @@ -1,7 +1,4 @@ -using Volo.Abp.Domain.Services; -using Volo.Abp.Json; - -namespace Lion.AbpPro.Cli.NuGet; +namespace Lion.AbpPro.Cli.NuGet; public class NuGetService : DomainService { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProOptions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProCliOptions.cs similarity index 84% rename from aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProOptions.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProCliOptions.cs index 8113a4ea..e09c2b1a 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProOptions.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProCliOptions.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.Cli.Options; -public class LionAbpProOptions +public class AbpProCliOptions { /// /// 仓库拥有者 @@ -25,6 +25,6 @@ public class LionAbpProOptions /// /// 模板信息 /// - public List Templates { get; set; } + public List Templates { get; set; } } \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProTemplateOptions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProTemplateOptions.cs similarity index 87% rename from aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProTemplateOptions.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProTemplateOptions.cs index 4a8f4d71..8e42dd7b 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/LionAbpProTemplateOptions.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Options/AbpProTemplateOptions.cs @@ -1,8 +1,8 @@ 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; Name = name; diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs index 7bfdb99a..e15d1ce6 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/SourceCode/SourceCodeManager.cs +++ b/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 { private readonly ILogger _logger; - private readonly ILionAbpProManager _lionAbpProManager; - private readonly LionAbpProOptions _options; + private readonly IAbpProManager _abpProManager; + private readonly AbpProCliOptions _cliOptions; - public SourceCodeManager(ILogger logger, IOptions options, ILionAbpProManager lionAbpProManager) + public SourceCodeManager(ILogger logger, IOptions options, IAbpProManager abpProManager) { _logger = logger; - _lionAbpProManager = lionAbpProManager; - _options = options.Value; + _abpProManager = abpProManager; + _cliOptions = options.Value; } /// @@ -19,29 +19,29 @@ public class SourceCodeManager : ITransientDependency, ISourceCodeManager /// 版本 public async Task GetAsync(string version) { - var latestVersion = await _lionAbpProManager.GetLatestSourceCodeVersionAsync(); + var latestVersion = await _abpProManager.GetLatestSourceCodeVersionAsync(); if (version == null) { version = latestVersion ?? throw new Exception("请检查版本是否正确"); } else { - if (!await _lionAbpProManager.CheckSourceCodeVersionAsync(version)) + if (!await _abpProManager.CheckSourceCodeVersionAsync(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($"模板生成中......"); 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 { @@ -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) diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/CmdHelper.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/CmdHelper.cs index c98c4948..41d5e4b4 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/CmdHelper.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/CmdHelper.cs @@ -1,7 +1,4 @@ -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace Lion.AbpPro.Cli.Utils; +namespace Lion.AbpPro.Cli.Utils; public class CmdHelper : ITransientDependency { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/ReplaceHelper.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/ReplaceHelper.cs index e21b9ff4..6ba69ee3 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/ReplaceHelper.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli.Core/Lion/AbpPro/Cli/Utils/ReplaceHelper.cs @@ -2,17 +2,6 @@ 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, 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, string replaceSuffix) { @@ -41,30 +23,6 @@ public static class ReplaceHelper 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) { 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, string replaceSuffix) @@ -171,23 +90,7 @@ public static class ReplaceHelper 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) { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/GlobalUsings.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/GlobalUsings.cs new file mode 100644 index 00000000..8904092e --- /dev/null +++ b/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; \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/AbpProCliModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/AbpProCliModule.cs index 4c7c086c..83f8a2d9 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/AbpProCliModule.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/AbpProCliModule.cs @@ -1,13 +1,4 @@ -using System.Threading.Tasks; -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; +namespace Lion.AbpPro.Cli; [DependsOn( typeof(Lion.AbpPro.Cli.AbpProCliCoreModule), diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/Program.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/Program.cs index 35fb8b78..1ce71966 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/Program.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Cli/Lion/AbpPro/Cli/Program.cs @@ -1,12 +1,4 @@ -using System; -using System.IO; -using System.Threading.Tasks; -using Microsoft.Extensions.DependencyInjection; -using Serilog; -using Serilog.Events; -using Volo.Abp; - -namespace Lion.AbpPro.Cli; +namespace Lion.AbpPro.Cli; public class Program { diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Core/GlobalUsings.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Core/GlobalUsings.cs index 744245fa..e0a563d5 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Core/GlobalUsings.cs +++ b/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.RegularExpressions; global using System.Web; -global using Lion.AbpPro.Core; \ No newline at end of file +global using Lion.AbpPro.Core; +global using Volo.Abp.Modularity; \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/AbpProCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/AbpProCoreModule.cs new file mode 100644 index 00000000..326797ef --- /dev/null +++ b/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 +{ +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/LionAbpProCoreModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/LionAbpProCoreModule.cs deleted file mode 100644 index ece7f5dc..00000000 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Core/Lion/AbpPro/Core/LionAbpProCoreModule.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Volo.Abp.Modularity; - -namespace Lion.AbpPro.Core; - -[DependsOn(typeof(LionAbpProLocalizationModule))] -public class LionAbpProCoreModule : AbpModule -{ -} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/LionAbpProEntityFrameworkCoreMysqlModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/AbpProEntityFrameworkCoreMysqlModule.cs similarity index 62% rename from aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/LionAbpProEntityFrameworkCoreMysqlModule.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/AbpProEntityFrameworkCoreMysqlModule.cs index 46cb2709..4da08e67 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/LionAbpProEntityFrameworkCoreMysqlModule.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.EntityFrameworkCore.Mysql/Lion/AbpPro/EntityFrameworkCore/Mysql/AbpProEntityFrameworkCoreMysqlModule.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro.EntityFrameworkCore.Mysql; [DependsOn(typeof(AbpEntityFrameworkCoreMySQLModule))] -public class LionAbpProEntityFrameworkCoreMysqlModule : AbpModule +public class AbpProEntityFrameworkCoreMysqlModule : AbpModule { } \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationConsts.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationConsts.cs similarity index 90% rename from aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationConsts.cs rename to aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationConsts.cs index e86482d3..eebbbce3 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationConsts.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationConsts.cs @@ -1,6 +1,6 @@ namespace Lion.AbpPro; -public class LionAbpProLocalizationConsts +public class AbpProLocalizationConsts { /// /// 名称空间 diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/AbpProLocalizationModule.cs new file mode 100644 index 00000000..9bafdbf4 --- /dev/null +++ b/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(options => { options.FileSets.AddEmbedded(AbpProLocalizationConsts.NameSpace); }); + + Configure(options => + { + options.Resources + .Add(AbpProLocalizationConsts.DefaultCultureName) + .AddVirtualJson(AbpProLocalizationConsts.DefaultLocalizationResourceVirtualPath); + + options.DefaultResourceType = typeof(AbpProLocalizationResource); + }); + + Configure(options => { options.MapCodeNamespace(AbpProLocalizationConsts.NameSpace, typeof(AbpProLocalizationResource)); }); + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationModule.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationModule.cs deleted file mode 100644 index 5e89afde..00000000 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/LionAbpProLocalizationModule.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace Lion.AbpPro; - -[DependsOn( - typeof(AbpAutofacModule), - typeof(AbpLocalizationModule) -)] -public class LionAbpProLocalizationModule : AbpModule -{ - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => { options.FileSets.AddEmbedded(LionAbpProLocalizationConsts.NameSpace); }); - - Configure(options => - { - options.Resources - .Add(LionAbpProLocalizationConsts.DefaultCultureName) - .AddVirtualJson(LionAbpProLocalizationConsts.DefaultLocalizationResourceVirtualPath); - - options.DefaultResourceType = typeof(LionAbpProLocalizationResource); - }); - - Configure(options => { options.MapCodeNamespace(LionAbpProLocalizationConsts.NameSpace, typeof(LionAbpProLocalizationResource)); }); - } -} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/AbpProLocalizationResource.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/AbpProLocalizationResource.cs new file mode 100644 index 00000000..0eb7acb8 --- /dev/null +++ b/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 +{ + +} \ No newline at end of file diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/LionAbpProLocalizationResource.cs b/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/LionAbpProLocalizationResource.cs deleted file mode 100644 index 7a26ae12..00000000 --- a/aspnet-core/frameworks/src/Lion.AbpPro.Localization/Lion/AbpPro/Localization/LionAbpProLocalizationResource.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Lion.AbpPro.Localization; - -[LocalizationResourceName("LionAbpProLocalizationResource")] -public class LionAbpProLocalizationResource -{ - -} \ No newline at end of file diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBase.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBase.cs similarity index 69% rename from aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBase.cs rename to aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBase.cs index 078484ee..a4b422ea 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBase.cs +++ b/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 { - public abstract class LionAbpProCoreCliTestBase : AbpIntegratedTest + public abstract class AbpProCoreCliTestBase : AbpIntegratedTest { protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) { diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBaseModule.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBaseModule.cs similarity index 73% rename from aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBaseModule.cs rename to aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProCoreCliTestBaseModule.cs index ca4bd393..760a965f 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProCoreCliTestBaseModule.cs +++ b/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.Options; using Volo.Abp; -using Volo.Abp.Autofac; using Volo.Abp.Modularity; -using LionAbpProOptions = Lion.AbpPro.Cli.Options.LionAbpProOptions; namespace Lion.AbpPro.Core.Cli { [DependsOn(typeof(AbpTestBaseModule), typeof(AbpProCliCoreModule))] - public class LionAbpProCoreCliTestBaseModule : AbpModule + public class AbpProCoreCliTestBaseModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => + Configure(options => { options.Owner = "WangJunZzz"; options.RepositoryId = "abp-vnext-pro"; diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProManagerTests.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/AbpProManagerTests.cs new file mode 100644 index 00000000..fd08d2a8 --- /dev/null +++ b/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(); + } + + [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); + } +} \ No newline at end of file diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProManagerTests.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProManagerTests.cs deleted file mode 100644 index 32533e6b..00000000 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Cli.Tests/Lion/AbpPro/Core/Cli/LionAbpProManagerTests.cs +++ /dev/null @@ -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(); - } - - [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); - } -} \ No newline at end of file diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBase.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBase.cs similarity index 72% rename from aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBase.cs rename to aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBase.cs index df3f7b2d..880158d1 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBase.cs +++ b/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 { - public abstract class LionAbpProTestBase : AbpIntegratedTest + public abstract class AbpProTestBase : AbpIntegratedTest { protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) { diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBaseModule.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBaseModule.cs similarity index 77% rename from aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBaseModule.cs rename to aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBaseModule.cs index 63971161..b3112014 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/LionAbpProTestBaseModule.cs +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Core.Tests/Lion/AbpPro/Core/AbpProTestBaseModule.cs @@ -6,7 +6,7 @@ namespace Lion.AbpPro.Core { [DependsOn(typeof(AbpTestBaseModule), typeof(AbpAutofacModule))] - public class LionAbpProTestBaseModule : AbpModule + public class AbpProTestBaseModule : AbpModule { } } \ No newline at end of file diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/TestsModule.cs b/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/TestsModule.cs index 6cd52b6f..3ed1b9e8 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/TestsModule.cs +++ b/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/TestsModule.cs @@ -103,7 +103,7 @@ namespace Lion.AbpPro.EntityFrameworkCore.Tests; typeof(AbpSettingManagementHttpApiModule), typeof(AbpSettingManagementWebModule), - typeof(LionAbpProEntityFrameworkCoreMysqlModule) + typeof(AbpProEntityFrameworkCoreMysqlModule) )] public class TestsModule : AbpModule { diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBase.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBase.cs similarity index 67% rename from aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBase.cs rename to aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBase.cs index d3b97dc9..db91cdcb 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBase.cs +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBase.cs @@ -4,7 +4,7 @@ using Volo.Abp.Testing; namespace Lion.AbpPro { - public abstract class LionAbpProLocalizationTestBase : AbpIntegratedTest + public abstract class AbpProLocalizationTestBase : AbpIntegratedTest { protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options) { diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBaseModule.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBaseModule.cs similarity index 51% rename from aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBaseModule.cs rename to aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBaseModule.cs index 7234d095..1c4d256c 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTestBaseModule.cs +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTestBaseModule.cs @@ -4,9 +4,9 @@ using Volo.Abp.Modularity; namespace Lion.AbpPro { - [DependsOn(typeof(LionAbpProLocalizationModule))] + [DependsOn(typeof(AbpProLocalizationModule))] [DependsOn(typeof(AbpTestBaseModule))] - public class LionAbpProLocalizationTestBaseModule : AbpModule + public class AbpProLocalizationTestBaseModule : AbpModule { } } diff --git a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTests.cs b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTests.cs similarity index 71% rename from aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTests.cs rename to aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTests.cs index 099878ed..4db9fc8a 100644 --- a/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/LionAbpProLocalizationTests.cs +++ b/aspnet-core/frameworks/test/Lion.AbpPro.Localization.Tests/Lion/AbpPro/AbpProLocalizationTests.cs @@ -6,13 +6,13 @@ using Xunit; namespace Lion.AbpPro { - public sealed class LionAbpProLocalizationTests : LionAbpProLocalizationTestBase + public sealed class AbpProLocalizationTests : AbpProLocalizationTestBase { - private readonly IStringLocalizer _stringLocalizer; + private readonly IStringLocalizer _stringLocalizer; - public LionAbpProLocalizationTests() + public AbpProLocalizationTests() { - _stringLocalizer = GetRequiredService>(); + _stringLocalizer = GetRequiredService>(); } [Fact] diff --git a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/BasicManagementDomainSharedModule.cs b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/BasicManagementDomainSharedModule.cs index 690e327d..ac3d8b3a 100644 --- a/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/BasicManagementDomainSharedModule.cs +++ b/aspnet-core/modules/BasicManagement/src/Lion.AbpPro.BasicManagement.Domain.Shared/BasicManagementDomainSharedModule.cs @@ -10,7 +10,7 @@ namespace Lion.AbpPro.BasicManagement; typeof(AbpPermissionManagementDomainSharedModule), typeof(AbpSettingManagementDomainSharedModule), typeof(AbpTenantManagementDomainSharedModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class BasicManagementDomainSharedModule : AbpModule { diff --git a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs index 165ec3ba..96269dcd 100644 --- a/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs +++ b/aspnet-core/modules/DataDictionaryManagement/src/Lion.AbpPro.DataDictionaryManagement.Domain.Shared/DataDictionaryManagementDomainSharedModule.cs @@ -4,7 +4,7 @@ namespace Lion.AbpPro.DataDictionaryManagement { [DependsOn( typeof(AbpValidationModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class DataDictionaryManagementDomainSharedModule : AbpModule { diff --git a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/FileManagementDomainSharedModule.cs b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/FileManagementDomainSharedModule.cs index 584fc23d..65c63570 100644 --- a/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/FileManagementDomainSharedModule.cs +++ b/aspnet-core/modules/FileManagement/src/Lion.AbpPro.FileManagement.Domain.Shared/FileManagementDomainSharedModule.cs @@ -4,7 +4,7 @@ namespace Lion.AbpPro.FileManagement; [DependsOn( typeof(AbpValidationModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class FileManagementDomainSharedModule : AbpModule { diff --git a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs index 1a436001..d2570e54 100644 --- a/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs +++ b/aspnet-core/modules/LanguageManagement/src/Lion.AbpPro.LanguageManagement.Domain.Shared/LanguageManagementDomainSharedModule.cs @@ -4,7 +4,7 @@ namespace Lion.AbpPro.LanguageManagement { [DependsOn( typeof(AbpValidationModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class LanguageManagementDomainSharedModule : AbpModule { diff --git a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs index 3f8022e9..7de7dd8d 100644 --- a/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs +++ b/aspnet-core/modules/NotificationManagement/host/Lion.AbpPro.NotificationManagement.HttpApi.Host/NotificationManagementHttpApiHostModule.cs @@ -8,7 +8,7 @@ namespace Lion.AbpPro.NotificationManagement; typeof(AbpCachingStackExchangeRedisModule), typeof(AbpAspNetCoreSerilogModule), typeof(AbpSwashbuckleModule), - typeof(LionAbpProCapModule), + typeof(AbpProCapModule), typeof(AbpEntityFrameworkCoreMySQLModule) )] public class NotificationManagementHttpApiHostModule : AbpModule diff --git a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs index 16d75426..3cf847d3 100644 --- a/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs +++ b/aspnet-core/modules/NotificationManagement/src/Lion.AbpPro.NotificationManagement.Domain.Shared/NotificationManagementDomainSharedModule.cs @@ -4,7 +4,7 @@ namespace Lion.AbpPro.NotificationManagement { [DependsOn( typeof(AbpValidationModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class NotificationManagementDomainSharedModule : AbpModule { diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs index 36c218c1..c1337b97 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/AbpProHttpApiHostModule.cs @@ -16,8 +16,8 @@ namespace Lion.AbpPro typeof(AbpAspNetCoreSerilogModule), typeof(AbpAccountWebModule), typeof(AbpProApplicationModule), - typeof(LionAbpProCapModule), - typeof(LionAbpProCapEntityFrameworkCoreModule), + typeof(AbpProCapModule), + typeof(AbpProCapEntityFrameworkCoreModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpCachingStackExchangeRedisModule), typeof(AbpBackgroundJobsHangfireModule) @@ -243,7 +243,7 @@ namespace Lion.AbpPro options.MapType(() => new OpenApiSchema() { Type = "file" }); options.SwaggerDoc("AbpPro", - new OpenApiInfo { Title = "LionAbpPro API", Version = "v1" }); + new OpenApiInfo { Title = "AbpPro API", Version = "v1" }); options.DocInclusionPredicate((docName, description) => true); options.EnableAnnotations(); // 启用注解 options.DocumentFilter(); @@ -324,7 +324,7 @@ namespace Lion.AbpPro capOptions.UseDashboard(options => { options.UseAuth = auth; - options.AuthorizationPolicy = LionAbpProCapPermissions.CapManagement.Cap; + options.AuthorizationPolicy = AbpProCapPermissions.CapManagement.Cap; }); }); } diff --git a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs index 5983d16c..6284e871 100644 --- a/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs +++ b/aspnet-core/services/src/Lion.AbpPro.Domain.Shared/AbpProDomainSharedModule.cs @@ -6,7 +6,7 @@ using Lion.AbpPro.LanguageManagement; namespace Lion.AbpPro { [DependsOn( - typeof(LionAbpProCoreModule), + typeof(AbpProCoreModule), typeof(BasicManagementDomainSharedModule), typeof(DataDictionaryManagementDomainSharedModule), typeof(NotificationManagementDomainSharedModule), diff --git a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs index 9e317a13..4f8f4888 100644 --- a/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs +++ b/aspnet-core/shared/Lion.AbpPro.Shared.Hosting.Microservices/Lion/AbpPro/SharedHostingMicroserviceModule.cs @@ -8,7 +8,7 @@ namespace Lion.AbpPro; [DependsOn( typeof(AbpSwashbuckleModule), typeof(AbpAutofacModule), - typeof(LionAbpProCoreModule))] + typeof(AbpProCoreModule))] public class SharedHostingMicroserviceModule : AbpModule { private const string DefaultCorsPolicyName = "Default"; diff --git a/templates/abp-vnext-pro-nuget-all/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs b/templates/abp-vnext-pro-nuget-all/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs index cf771471..d6e59278 100644 --- a/templates/abp-vnext-pro-nuget-all/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs +++ b/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(NotificationManagementDomainSharedModule), typeof(DataDictionaryManagementDomainSharedModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class MyProjectNameDomainSharedModule : AbpModule { diff --git a/templates/abp-vnext-pro-nuget-module/src/MyCompanyName.MyProjectName.MyModuleName.Domain.Shared/MyModuleNameDomainSharedModule.cs b/templates/abp-vnext-pro-nuget-module/src/MyCompanyName.MyProjectName.MyModuleName.Domain.Shared/MyModuleNameDomainSharedModule.cs index 1d475114..e6824388 100644 --- a/templates/abp-vnext-pro-nuget-module/src/MyCompanyName.MyProjectName.MyModuleName.Domain.Shared/MyModuleNameDomainSharedModule.cs +++ b/templates/abp-vnext-pro-nuget-module/src/MyCompanyName.MyProjectName.MyModuleName.Domain.Shared/MyModuleNameDomainSharedModule.cs @@ -4,7 +4,7 @@ namespace MyCompanyName.MyProjectName.MyModuleName { [DependsOn( typeof(AbpValidationModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class MyModuleNameDomainSharedModule : AbpModule { diff --git a/templates/abp-vnext-pro-nuget-simplify/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs b/templates/abp-vnext-pro-nuget-simplify/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs index cf771471..d6e59278 100644 --- a/templates/abp-vnext-pro-nuget-simplify/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/MyProjectNameDomainSharedModule.cs +++ b/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(NotificationManagementDomainSharedModule), typeof(DataDictionaryManagementDomainSharedModule), - typeof(LionAbpProCoreModule) + typeof(AbpProCoreModule) )] public class MyProjectNameDomainSharedModule : AbpModule {