From 88fce45394cdba0868774e6caf5e238ffaebd40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Thu, 7 Oct 2021 00:25:03 +0300 Subject: [PATCH] Added BackgroundJobs module installer package --- .../AbpAuditLoggingInstallerModule.cs | 2 +- .../AuditLoggingInstallerPipelineBuilder.cs} | 4 +-- .../Volo.Abp.BackgroundJobs.sln | 7 +++++ .../FodyWeavers.xml | 3 ++ .../FodyWeavers.xsd | 30 +++++++++++++++++++ .../Volo.Abp.BackgroundJobs.Installer.csproj | 22 ++++++++++++++ .../AbpBackgroundJobsInstallerModule.cs | 21 +++++++++++++ .../BackgroundJobsInstallerPipelineBuilder.cs | 24 +++++++++++++++ 8 files changed, 110 insertions(+), 3 deletions(-) rename modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/{Account => AuditLogging}/AbpAuditLoggingInstallerModule.cs (94%) rename modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/{Account/AuditLogingInstallerPipelineBuilder.cs => AuditLogging/AuditLoggingInstallerPipelineBuilder.cs} (80%) create mode 100644 modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xml create mode 100644 modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xsd create mode 100644 modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj create mode 100644 modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/AbpBackgroundJobsInstallerModule.cs create mode 100644 modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/BackgroundJobsInstallerPipelineBuilder.cs diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AbpAuditLoggingInstallerModule.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AbpAuditLoggingInstallerModule.cs similarity index 94% rename from modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AbpAuditLoggingInstallerModule.cs rename to modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AbpAuditLoggingInstallerModule.cs index 3aff95001e..d634e7aa60 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AbpAuditLoggingInstallerModule.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AbpAuditLoggingInstallerModule.cs @@ -2,7 +2,7 @@ using Volo.Abp.Studio; using Volo.Abp.VirtualFileSystem; -namespace Volo.Abp.Account +namespace Volo.Abp.AuditLogging { [DependsOn( typeof(AbpStudioModuleInstallerModule), diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AuditLogingInstallerPipelineBuilder.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AuditLoggingInstallerPipelineBuilder.cs similarity index 80% rename from modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AuditLogingInstallerPipelineBuilder.cs rename to modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AuditLoggingInstallerPipelineBuilder.cs index a2003c1eae..ad0128c639 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AuditLogingInstallerPipelineBuilder.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/AuditLogging/AuditLoggingInstallerPipelineBuilder.cs @@ -3,11 +3,11 @@ using Microsoft.Extensions.DependencyInjection; using Volo.Abp.DependencyInjection; using Volo.Abp.Studio.ModuleInstalling; -namespace Volo.Abp.Account +namespace Volo.Abp.AuditLogging { [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] [ExposeServices(typeof(IModuleInstallingPipelineBuilder))] - public class AuditLogingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency + public class AuditLoggingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency { public async Task BuildAsync(ModuleInstallingContext context) { diff --git a/modules/background-jobs/Volo.Abp.BackgroundJobs.sln b/modules/background-jobs/Volo.Abp.BackgroundJobs.sln index 771eb08b19..2b2d8620a6 100644 --- a/modules/background-jobs/Volo.Abp.BackgroundJobs.sln +++ b/modules/background-jobs/Volo.Abp.BackgroundJobs.sln @@ -35,6 +35,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.BackgroundJobs.Dem EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BackgroundJobs.DemoApp.Quartz", "app\Volo.Abp.BackgroundJobs.DemoApp.Quartz\Volo.Abp.BackgroundJobs.DemoApp.Quartz.csproj", "{0146891D-3FF8-4516-94D6-B9EFC37383CD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.BackgroundJobs.Installer", "src\Volo.Abp.BackgroundJobs.Installer\Volo.Abp.BackgroundJobs.Installer.csproj", "{FCD1EFC7-28D6-40F5-8C9A-7DE0328D6758}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -93,6 +95,10 @@ Global {0146891D-3FF8-4516-94D6-B9EFC37383CD}.Debug|Any CPU.Build.0 = Debug|Any CPU {0146891D-3FF8-4516-94D6-B9EFC37383CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {0146891D-3FF8-4516-94D6-B9EFC37383CD}.Release|Any CPU.Build.0 = Release|Any CPU + {FCD1EFC7-28D6-40F5-8C9A-7DE0328D6758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCD1EFC7-28D6-40F5-8C9A-7DE0328D6758}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCD1EFC7-28D6-40F5-8C9A-7DE0328D6758}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCD1EFC7-28D6-40F5-8C9A-7DE0328D6758}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -111,6 +117,7 @@ Global {2060AC85-2598-4342-A87C-A684A2C71A37} = {E400416D-2895-4512-9D17-90681EEC7E0A} {7C8D03F7-165E-478C-A6D6-DC8229EEABB9} = {E400416D-2895-4512-9D17-90681EEC7E0A} {0146891D-3FF8-4516-94D6-B9EFC37383CD} = {E400416D-2895-4512-9D17-90681EEC7E0A} + {FCD1EFC7-28D6-40F5-8C9A-7DE0328D6758} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {4324B3B4-B60B-4E3C-91D8-59576B4E26DD} diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xml b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xml new file mode 100644 index 0000000000..00e1d9a1c1 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xsd b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj new file mode 100644 index 0000000000..59bd54205d --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo.Abp.BackgroundJobs.Installer.csproj @@ -0,0 +1,22 @@ + + + + + + + net5.0 + true + + + + + + + + + + + + + + diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/AbpBackgroundJobsInstallerModule.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/AbpBackgroundJobsInstallerModule.cs new file mode 100644 index 0000000000..fb1bcf4014 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/AbpBackgroundJobsInstallerModule.cs @@ -0,0 +1,21 @@ +using Volo.Abp.Modularity; +using Volo.Abp.Studio; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.BackgroundJobs +{ + [DependsOn( + typeof(AbpStudioModuleInstallerModule), + typeof(AbpVirtualFileSystemModule) + )] + public class AbpBackgroundJobsInstallerModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } + } +} diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/BackgroundJobsInstallerPipelineBuilder.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/BackgroundJobsInstallerPipelineBuilder.cs new file mode 100644 index 0000000000..8011bd2272 --- /dev/null +++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Installer/Volo/Abp/BackgroundJobs/BackgroundJobsInstallerPipelineBuilder.cs @@ -0,0 +1,24 @@ +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Studio.ModuleInstalling; + +namespace Volo.Abp.BackgroundJobs +{ + [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] + [ExposeServices(typeof(IModuleInstallingPipelineBuilder))] + public class BackgroundJobsInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency + { + public async Task BuildAsync(ModuleInstallingContext context) + { + context.AddEfCoreConfigurationMethodDeclaration( + new EfCoreConfigurationMethodDeclaration( + "Volo.Abp.BackgroundJobs.EntityFrameworkCore", + "ConfigureBackgroundJobs" + ) + ); + + return GetBasePipeline(context); + } + } +}