From 6ac4e4def83af9600245b015167b62639c5542d5 Mon Sep 17 00:00:00 2001 From: William Obando Date: Tue, 23 May 2017 13:33:28 -0500 Subject: [PATCH 1/2] Created package Abp.Zero.Configuration --- Abp.Zero.sln | 23 ++++++++++++------- src/Abp.Zero.Common/Abp.Zero.Common.csproj | 1 + .../Zero/AbpZeroCommonModule.cs | 2 +- .../Abp.Zero.Configuration.csproj | 12 ++++++++++ .../Configuration/Setting.cs | 2 +- .../Configuration/SettingExtensions.cs | 0 .../Configuration/SettingStore.cs | 6 ++--- src/Abp.Zero.Configuration/SettingsModule.cs | 13 +++++++++++ 8 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 src/Abp.Zero.Configuration/Abp.Zero.Configuration.csproj rename src/{Abp.Zero.Common => Abp.Zero.Configuration}/Configuration/Setting.cs (99%) rename src/{Abp.Zero.Common => Abp.Zero.Configuration}/Configuration/SettingExtensions.cs (100%) rename src/{Abp.Zero.Common => Abp.Zero.Configuration}/Configuration/SettingStore.cs (95%) create mode 100644 src/Abp.Zero.Configuration/SettingsModule.cs diff --git a/Abp.Zero.sln b/Abp.Zero.sln index 622e5d3c..b32eb934 100644 --- a/Abp.Zero.sln +++ b/Abp.Zero.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +VisualStudioVersion = 15.0.26430.4 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{364398C2-9B6A-40B3-9845-23ABFB8D12AB}" EndProject @@ -41,11 +41,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.Zero.Owin", "src\Abp.Ze EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.Zero.AspNetCore", "src\Abp.Zero.AspNetCore\Abp.Zero.AspNetCore.csproj", "{8EE2ACFF-CB44-4A7E-8FE7-5709AD245F44}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.ZeroCore", "src\Abp.ZeroCore\Abp.ZeroCore.csproj", "{C5F4218F-2637-4629-B43B-7728D28CB19E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore", "src\Abp.ZeroCore\Abp.ZeroCore.csproj", "{C5F4218F-2637-4629-B43B-7728D28CB19E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.Zero.Common", "src\Abp.Zero.Common\Abp.Zero.Common.csproj", "{EABE7BBB-A837-4607-9B0D-BE41E4A0F81F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.Zero.Common", "src\Abp.Zero.Common\Abp.Zero.Common.csproj", "{EABE7BBB-A837-4607-9B0D-BE41E4A0F81F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.ZeroCore.EntityFrameworkCore", "src\Abp.ZeroCore.EntityFrameworkCore\Abp.ZeroCore.EntityFrameworkCore.csproj", "{39A3807E-4309-43D7-98C1-246547108006}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore.EntityFrameworkCore", "src\Abp.ZeroCore.EntityFrameworkCore\Abp.ZeroCore.EntityFrameworkCore.csproj", "{39A3807E-4309-43D7-98C1-246547108006}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ZeroCore", "ZeroCore", "{A6CB86B2-8C58-42D7-917A-F1DEB29C121A}" EndProject @@ -55,15 +55,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Zero", "Zero", "{4A2AFB7B-F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{12068527-E860-4AC1-88C3-62B435E4BBE5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.ZeroCore.IdentityServer4", "src\Abp.ZeroCore.IdentityServer4\Abp.ZeroCore.IdentityServer4.csproj", "{41608BBD-C619-4579-AA32-CA6FC6B7F810}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore.IdentityServer4", "src\Abp.ZeroCore.IdentityServer4\Abp.ZeroCore.IdentityServer4.csproj", "{41608BBD-C619-4579-AA32-CA6FC6B7F810}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ZeroCore", "ZeroCore", "{01532A9D-77F4-477E-A43E-0E7078E4E9DD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.ZeroCore.IdentityServer4.Tests", "test\Abp.ZeroCore.IdentityServer4.Tests\Abp.ZeroCore.IdentityServer4.Tests.csproj", "{4B03D73D-D453-4FCB-95C8-F23D1B300DE7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore.IdentityServer4.Tests", "test\Abp.ZeroCore.IdentityServer4.Tests\Abp.ZeroCore.IdentityServer4.Tests.csproj", "{4B03D73D-D453-4FCB-95C8-F23D1B300DE7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.ZeroCore.SampleApp", "test\Abp.ZeroCore.SampleApp\Abp.ZeroCore.SampleApp.csproj", "{D1084B66-375B-433A-9742-FD4A703994E1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore.SampleApp", "test\Abp.ZeroCore.SampleApp\Abp.ZeroCore.SampleApp.csproj", "{D1084B66-375B-433A-9742-FD4A703994E1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Abp.ZeroCore.Tests", "test\Abp.ZeroCore.Tests\Abp.ZeroCore.Tests.csproj", "{72427FA6-BC94-42AA-B9AC-3CF2E257E41B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore.Tests", "test\Abp.ZeroCore.Tests\Abp.ZeroCore.Tests.csproj", "{72427FA6-BC94-42AA-B9AC-3CF2E257E41B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.Zero.Configuration", "src\Abp.Zero.Configuration\Abp.Zero.Configuration.csproj", "{AECDF1B2-083C-463C-B6B5-F8040F573C1F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -155,6 +157,10 @@ Global {72427FA6-BC94-42AA-B9AC-3CF2E257E41B}.Debug|Any CPU.Build.0 = Debug|Any CPU {72427FA6-BC94-42AA-B9AC-3CF2E257E41B}.Release|Any CPU.ActiveCfg = Release|Any CPU {72427FA6-BC94-42AA-B9AC-3CF2E257E41B}.Release|Any CPU.Build.0 = Release|Any CPU + {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -186,5 +192,6 @@ Global {4B03D73D-D453-4FCB-95C8-F23D1B300DE7} = {01532A9D-77F4-477E-A43E-0E7078E4E9DD} {D1084B66-375B-433A-9742-FD4A703994E1} = {01532A9D-77F4-477E-A43E-0E7078E4E9DD} {72427FA6-BC94-42AA-B9AC-3CF2E257E41B} = {01532A9D-77F4-477E-A43E-0E7078E4E9DD} + {AECDF1B2-083C-463C-B6B5-F8040F573C1F} = {12068527-E860-4AC1-88C3-62B435E4BBE5} EndGlobalSection EndGlobal diff --git a/src/Abp.Zero.Common/Abp.Zero.Common.csproj b/src/Abp.Zero.Common/Abp.Zero.Common.csproj index e0c2c2b9..c078f4d1 100644 --- a/src/Abp.Zero.Common/Abp.Zero.Common.csproj +++ b/src/Abp.Zero.Common/Abp.Zero.Common.csproj @@ -45,6 +45,7 @@ + \ No newline at end of file diff --git a/src/Abp.Zero.Common/Zero/AbpZeroCommonModule.cs b/src/Abp.Zero.Common/Zero/AbpZeroCommonModule.cs index 9c0ee0e1..083a652f 100644 --- a/src/Abp.Zero.Common/Zero/AbpZeroCommonModule.cs +++ b/src/Abp.Zero.Common/Zero/AbpZeroCommonModule.cs @@ -20,7 +20,7 @@ namespace Abp.Zero /// /// ABP zero core module. /// - [DependsOn(typeof(AbpKernelModule))] + [DependsOn(typeof(AbpKernelModule), typeof(SettingsModule))] public class AbpZeroCommonModule : AbpModule { public override void PreInitialize() diff --git a/src/Abp.Zero.Configuration/Abp.Zero.Configuration.csproj b/src/Abp.Zero.Configuration/Abp.Zero.Configuration.csproj new file mode 100644 index 00000000..3d693b46 --- /dev/null +++ b/src/Abp.Zero.Configuration/Abp.Zero.Configuration.csproj @@ -0,0 +1,12 @@ + + + + net46;netstandard1.6 + Abp + False + + + + + + \ No newline at end of file diff --git a/src/Abp.Zero.Common/Configuration/Setting.cs b/src/Abp.Zero.Configuration/Configuration/Setting.cs similarity index 99% rename from src/Abp.Zero.Common/Configuration/Setting.cs rename to src/Abp.Zero.Configuration/Configuration/Setting.cs index 8beaf0cc..f7545b25 100644 --- a/src/Abp.Zero.Common/Configuration/Setting.cs +++ b/src/Abp.Zero.Configuration/Configuration/Setting.cs @@ -69,4 +69,4 @@ public Setting(int? tenantId, long? userId, string name, string value) Value = value; } } -} \ No newline at end of file +} diff --git a/src/Abp.Zero.Common/Configuration/SettingExtensions.cs b/src/Abp.Zero.Configuration/Configuration/SettingExtensions.cs similarity index 100% rename from src/Abp.Zero.Common/Configuration/SettingExtensions.cs rename to src/Abp.Zero.Configuration/Configuration/SettingExtensions.cs diff --git a/src/Abp.Zero.Common/Configuration/SettingStore.cs b/src/Abp.Zero.Configuration/Configuration/SettingStore.cs similarity index 95% rename from src/Abp.Zero.Common/Configuration/SettingStore.cs rename to src/Abp.Zero.Configuration/Configuration/SettingStore.cs index 5c5865ee..833d9fef 100644 --- a/src/Abp.Zero.Common/Configuration/SettingStore.cs +++ b/src/Abp.Zero.Configuration/Configuration/SettingStore.cs @@ -53,7 +53,7 @@ public virtual async Task GetSettingOrNullAsync(int? tenantId, long using (_unitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant)) { return (await _settingRepository.FirstOrDefaultAsync(s => s.UserId == userId && s.Name == name && s.TenantId == tenantId)) - .ToSettingInfo(); + .ToSettingInfo(); } } } @@ -66,7 +66,7 @@ public virtual async Task DeleteAsync(SettingInfo settingInfo) using (_unitOfWorkManager.Current.DisableFilter(AbpDataFilters.MayHaveTenant)) { await _settingRepository.DeleteAsync( - s => s.UserId == settingInfo.UserId && s.Name == settingInfo.Name && s.TenantId == settingInfo.TenantId + s => s.UserId == settingInfo.UserId && s.Name == settingInfo.Name && s.TenantId == settingInfo.TenantId ); await _unitOfWorkManager.Current.SaveChangesAsync(); } @@ -97,7 +97,7 @@ public virtual async Task UpdateAsync(SettingInfo settingInfo) s => s.TenantId == settingInfo.TenantId && s.UserId == settingInfo.UserId && s.Name == settingInfo.Name - ); + ); if (setting != null) { diff --git a/src/Abp.Zero.Configuration/SettingsModule.cs b/src/Abp.Zero.Configuration/SettingsModule.cs new file mode 100644 index 00000000..9b479bcb --- /dev/null +++ b/src/Abp.Zero.Configuration/SettingsModule.cs @@ -0,0 +1,13 @@ +using Abp.Modules; +using Abp.Reflection.Extensions; + +namespace Abp +{ + public class SettingsModule : AbpModule + { + public override void Initialize() + { + IocManager.RegisterAssemblyByConvention(typeof(SettingsModule).GetAssembly()); + } + } +} From eaceb00b55c292238f98854b2abcabb3c19f61a5 Mon Sep 17 00:00:00 2001 From: William Obando Date: Tue, 23 May 2017 13:42:56 -0500 Subject: [PATCH 2/2] Changed name to Abp.EntityFramework.SettingStore --- Abp.Zero.sln | 12 ++++++------ .../Abp.EntityFramework.SettingStore.csproj} | 0 .../Configuration/Setting.cs | 0 .../Configuration/SettingExtensions.cs | 0 .../Configuration/SettingStore.cs | 0 .../SettingsModule.cs | 0 src/Abp.Zero.Common/Abp.Zero.Common.csproj | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename src/{Abp.Zero.Configuration/Abp.Zero.Configuration.csproj => Abp.EntityFramework.SettingStore/Abp.EntityFramework.SettingStore.csproj} (100%) rename src/{Abp.Zero.Configuration => Abp.EntityFramework.SettingStore}/Configuration/Setting.cs (100%) rename src/{Abp.Zero.Configuration => Abp.EntityFramework.SettingStore}/Configuration/SettingExtensions.cs (100%) rename src/{Abp.Zero.Configuration => Abp.EntityFramework.SettingStore}/Configuration/SettingStore.cs (100%) rename src/{Abp.Zero.Configuration => Abp.EntityFramework.SettingStore}/SettingsModule.cs (100%) diff --git a/Abp.Zero.sln b/Abp.Zero.sln index b32eb934..afd558e4 100644 --- a/Abp.Zero.sln +++ b/Abp.Zero.sln @@ -65,7 +65,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore.SampleApp", "t EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.ZeroCore.Tests", "test\Abp.ZeroCore.Tests\Abp.ZeroCore.Tests.csproj", "{72427FA6-BC94-42AA-B9AC-3CF2E257E41B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.Zero.Configuration", "src\Abp.Zero.Configuration\Abp.Zero.Configuration.csproj", "{AECDF1B2-083C-463C-B6B5-F8040F573C1F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.EntityFramework.SettingStore", "src\Abp.EntityFramework.SettingStore\Abp.EntityFramework.SettingStore.csproj", "{5B0C9B90-BAB6-4175-8614-B2F622B5D501}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -157,10 +157,10 @@ Global {72427FA6-BC94-42AA-B9AC-3CF2E257E41B}.Debug|Any CPU.Build.0 = Debug|Any CPU {72427FA6-BC94-42AA-B9AC-3CF2E257E41B}.Release|Any CPU.ActiveCfg = Release|Any CPU {72427FA6-BC94-42AA-B9AC-3CF2E257E41B}.Release|Any CPU.Build.0 = Release|Any CPU - {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AECDF1B2-083C-463C-B6B5-F8040F573C1F}.Release|Any CPU.Build.0 = Release|Any CPU + {5B0C9B90-BAB6-4175-8614-B2F622B5D501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5B0C9B90-BAB6-4175-8614-B2F622B5D501}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B0C9B90-BAB6-4175-8614-B2F622B5D501}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B0C9B90-BAB6-4175-8614-B2F622B5D501}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -192,6 +192,6 @@ Global {4B03D73D-D453-4FCB-95C8-F23D1B300DE7} = {01532A9D-77F4-477E-A43E-0E7078E4E9DD} {D1084B66-375B-433A-9742-FD4A703994E1} = {01532A9D-77F4-477E-A43E-0E7078E4E9DD} {72427FA6-BC94-42AA-B9AC-3CF2E257E41B} = {01532A9D-77F4-477E-A43E-0E7078E4E9DD} - {AECDF1B2-083C-463C-B6B5-F8040F573C1F} = {12068527-E860-4AC1-88C3-62B435E4BBE5} + {5B0C9B90-BAB6-4175-8614-B2F622B5D501} = {12068527-E860-4AC1-88C3-62B435E4BBE5} EndGlobalSection EndGlobal diff --git a/src/Abp.Zero.Configuration/Abp.Zero.Configuration.csproj b/src/Abp.EntityFramework.SettingStore/Abp.EntityFramework.SettingStore.csproj similarity index 100% rename from src/Abp.Zero.Configuration/Abp.Zero.Configuration.csproj rename to src/Abp.EntityFramework.SettingStore/Abp.EntityFramework.SettingStore.csproj diff --git a/src/Abp.Zero.Configuration/Configuration/Setting.cs b/src/Abp.EntityFramework.SettingStore/Configuration/Setting.cs similarity index 100% rename from src/Abp.Zero.Configuration/Configuration/Setting.cs rename to src/Abp.EntityFramework.SettingStore/Configuration/Setting.cs diff --git a/src/Abp.Zero.Configuration/Configuration/SettingExtensions.cs b/src/Abp.EntityFramework.SettingStore/Configuration/SettingExtensions.cs similarity index 100% rename from src/Abp.Zero.Configuration/Configuration/SettingExtensions.cs rename to src/Abp.EntityFramework.SettingStore/Configuration/SettingExtensions.cs diff --git a/src/Abp.Zero.Configuration/Configuration/SettingStore.cs b/src/Abp.EntityFramework.SettingStore/Configuration/SettingStore.cs similarity index 100% rename from src/Abp.Zero.Configuration/Configuration/SettingStore.cs rename to src/Abp.EntityFramework.SettingStore/Configuration/SettingStore.cs diff --git a/src/Abp.Zero.Configuration/SettingsModule.cs b/src/Abp.EntityFramework.SettingStore/SettingsModule.cs similarity index 100% rename from src/Abp.Zero.Configuration/SettingsModule.cs rename to src/Abp.EntityFramework.SettingStore/SettingsModule.cs diff --git a/src/Abp.Zero.Common/Abp.Zero.Common.csproj b/src/Abp.Zero.Common/Abp.Zero.Common.csproj index c078f4d1..b607fe19 100644 --- a/src/Abp.Zero.Common/Abp.Zero.Common.csproj +++ b/src/Abp.Zero.Common/Abp.Zero.Common.csproj @@ -45,7 +45,7 @@ - + \ No newline at end of file