From 4e0801b6bac6552f30efe037db918cc798f9c439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Thu, 7 Oct 2021 00:20:15 +0300 Subject: [PATCH] added AuditLogging module installer package --- .../audit-logging/Volo.Abp.AuditLogging.sln | 7 +++++ .../FodyWeavers.xml | 3 ++ .../FodyWeavers.xsd | 30 +++++++++++++++++++ .../Volo.Abp.AuditLogging.Installer.csproj | 22 ++++++++++++++ .../Account/AbpAuditLoggingInstallerModule.cs | 21 +++++++++++++ .../AuditLogingInstallerPipelineBuilder.cs | 24 +++++++++++++++ 6 files changed, 107 insertions(+) create mode 100644 modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/FodyWeavers.xml create mode 100644 modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/FodyWeavers.xsd create mode 100644 modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj create mode 100644 modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AbpAuditLoggingInstallerModule.cs create mode 100644 modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AuditLogingInstallerPipelineBuilder.cs diff --git a/modules/audit-logging/Volo.Abp.AuditLogging.sln b/modules/audit-logging/Volo.Abp.AuditLogging.sln index 747abf454a..02c68f1ee4 100644 --- a/modules/audit-logging/Volo.Abp.AuditLogging.sln +++ b/modules/audit-logging/Volo.Abp.AuditLogging.sln @@ -23,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AuditLogging.Entit EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AuditLogging.MongoDB.Tests", "test\Volo.Abp.AuditLogging.MongoDB.Tests\Volo.Abp.AuditLogging.MongoDB.Tests.csproj", "{9F04C908-F4B9-45B4-BB9A-26A1462D4D7F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AuditLogging.Installer", "src\Volo.Abp.AuditLogging.Installer\Volo.Abp.AuditLogging.Installer.csproj", "{E5F8A2AD-7D8D-4F9E-B606-737784DC90BA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -61,6 +63,10 @@ Global {9F04C908-F4B9-45B4-BB9A-26A1462D4D7F}.Debug|Any CPU.Build.0 = Debug|Any CPU {9F04C908-F4B9-45B4-BB9A-26A1462D4D7F}.Release|Any CPU.ActiveCfg = Release|Any CPU {9F04C908-F4B9-45B4-BB9A-26A1462D4D7F}.Release|Any CPU.Build.0 = Release|Any CPU + {E5F8A2AD-7D8D-4F9E-B606-737784DC90BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5F8A2AD-7D8D-4F9E-B606-737784DC90BA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5F8A2AD-7D8D-4F9E-B606-737784DC90BA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5F8A2AD-7D8D-4F9E-B606-737784DC90BA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -74,6 +80,7 @@ Global {6CDB588F-B5FD-4F2A-9599-49ACE2D7AF83} = {971E31E2-FC37-41D3-8B6E-96848105C446} {CBED3E11-0A33-4B56-A75C-A57D25C98C38} = {971E31E2-FC37-41D3-8B6E-96848105C446} {9F04C908-F4B9-45B4-BB9A-26A1462D4D7F} = {971E31E2-FC37-41D3-8B6E-96848105C446} + {E5F8A2AD-7D8D-4F9E-B606-737784DC90BA} = {CFAB155F-5255-4D99-94E2-3361D8EA4B15} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9F36BAE5-A9CF-460C-8E7E-4580347F71F6} diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/FodyWeavers.xml b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/FodyWeavers.xml new file mode 100644 index 0000000000..00e1d9a1c1 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/FodyWeavers.xsd b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.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/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj new file mode 100644 index 0000000000..27ab25e369 --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo.Abp.AuditLogging.Installer.csproj @@ -0,0 +1,22 @@ + + + + + + + net5.0 + true + + + + + + + + + + + + + + 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/Account/AbpAuditLoggingInstallerModule.cs new file mode 100644 index 0000000000..3aff95001e --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AbpAuditLoggingInstallerModule.cs @@ -0,0 +1,21 @@ +using Volo.Abp.Modularity; +using Volo.Abp.Studio; +using Volo.Abp.VirtualFileSystem; + +namespace Volo.Abp.Account +{ + [DependsOn( + typeof(AbpStudioModuleInstallerModule), + typeof(AbpVirtualFileSystemModule) + )] + public class AbpAuditLoggingInstallerModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } + } +} 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/Account/AuditLogingInstallerPipelineBuilder.cs new file mode 100644 index 0000000000..a2003c1eae --- /dev/null +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Installer/Volo/Abp/Account/AuditLogingInstallerPipelineBuilder.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.Account +{ + [Dependency(ServiceLifetime.Transient, ReplaceServices = true)] + [ExposeServices(typeof(IModuleInstallingPipelineBuilder))] + public class AuditLogingInstallerPipelineBuilder : ModuleInstallingPipelineBuilderBase, IModuleInstallingPipelineBuilder, ITransientDependency + { + public async Task BuildAsync(ModuleInstallingContext context) + { + context.AddEfCoreConfigurationMethodDeclaration( + new EfCoreConfigurationMethodDeclaration( + "Volo.Abp.AuditLogging.EntityFrameworkCore", + "ConfigureAuditLogging" + ) + ); + + return GetBasePipeline(context); + } + } +}