From 31fafcfb6f18b07fec25657e61debaac41324832 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Mon, 14 Mar 2022 16:15:04 +0300 Subject: [PATCH 1/6] feat: user can set a variable on the environment without extending --- npm/ng-packs/packages/core/src/lib/models/environment.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/npm/ng-packs/packages/core/src/lib/models/environment.ts b/npm/ng-packs/packages/core/src/lib/models/environment.ts index 46596685b0..f48b9d4701 100644 --- a/npm/ng-packs/packages/core/src/lib/models/environment.ts +++ b/npm/ng-packs/packages/core/src/lib/models/environment.ts @@ -10,6 +10,9 @@ export interface Environment { oAuthConfig: AuthConfig; production: boolean; remoteEnv?: RemoteEnv; + customSettings?:{ + [key:string]: any; + } } export interface ApplicationInfo { From a4514167b5b3606b98a5770b71f9fc7dc4b683db Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Thu, 24 Mar 2022 10:07:30 +0300 Subject: [PATCH 2/6] Change Custom Settings to [key: string]:any in environment.ts --- npm/ng-packs/packages/core/src/lib/models/environment.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/models/environment.ts b/npm/ng-packs/packages/core/src/lib/models/environment.ts index f48b9d4701..062b1df82b 100644 --- a/npm/ng-packs/packages/core/src/lib/models/environment.ts +++ b/npm/ng-packs/packages/core/src/lib/models/environment.ts @@ -10,11 +10,8 @@ export interface Environment { oAuthConfig: AuthConfig; production: boolean; remoteEnv?: RemoteEnv; - customSettings?:{ - [key:string]: any; - } + [key:string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any } - export interface ApplicationInfo { name: string; baseUrl?: string; From ce61e6673e4f38f22b6ad2f611986cd6d089591a Mon Sep 17 00:00:00 2001 From: malik masis Date: Thu, 24 Mar 2022 17:36:03 +0300 Subject: [PATCH 3/6] Updated Distributed-Locking.md --- docs/en/Distributed-Locking.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/en/Distributed-Locking.md b/docs/en/Distributed-Locking.md index bea10645ca..4145a7fb1f 100644 --- a/docs/en/Distributed-Locking.md +++ b/docs/en/Distributed-Locking.md @@ -27,6 +27,10 @@ using Medallion.Threading.Redis; namespace AbpDemo { + [DependsOn( + typeof(AbpDistributedLockingModule) + //If you have the other dependencies, you should do here + )] public class MyModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) @@ -63,7 +67,7 @@ There are two ways to use the distributed locking API: ABP's `IAbpDistributedLoc **Example: Using the `IAbpDistributedLock.TryAcquireAsync` method** -````csharp + ````csharp using Volo.Abp.DistributedLocking; namespace AbpDemo From 8675f9d3e1aa3046622eb427959cd379f277a9c7 Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 25 Mar 2022 09:21:05 +0300 Subject: [PATCH 4/6] Removed the unnecessary space --- docs/en/Distributed-Locking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Distributed-Locking.md b/docs/en/Distributed-Locking.md index 4145a7fb1f..e3c57abdbd 100644 --- a/docs/en/Distributed-Locking.md +++ b/docs/en/Distributed-Locking.md @@ -67,7 +67,7 @@ There are two ways to use the distributed locking API: ABP's `IAbpDistributedLoc **Example: Using the `IAbpDistributedLock.TryAcquireAsync` method** - ````csharp +````csharp using Volo.Abp.DistributedLocking; namespace AbpDemo From 8686e396fa25d881757b7ee0fbdcafed05c4c03a Mon Sep 17 00:00:00 2001 From: malik masis Date: Fri, 25 Mar 2022 09:49:51 +0300 Subject: [PATCH 5/6] Made code formatting --- docs/en/Distributed-Locking.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/en/Distributed-Locking.md b/docs/en/Distributed-Locking.md index e3c57abdbd..d57fd45c83 100644 --- a/docs/en/Distributed-Locking.md +++ b/docs/en/Distributed-Locking.md @@ -31,21 +31,21 @@ namespace AbpDemo typeof(AbpDistributedLockingModule) //If you have the other dependencies, you should do here )] - public class MyModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - var configuration = context.Services.GetConfiguration(); - - context.Services.AddSingleton(sp => - { - var connection = ConnectionMultiplexer + public class MyModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var configuration = context.Services.GetConfiguration(); + + context.Services.AddSingleton(sp => + { + var connection = ConnectionMultiplexer .Connect(configuration["Redis:Configuration"]); - return new + return new RedisDistributedSynchronizationProvider(connection.GetDatabase()); - }); - } - } + }); + } + } } ```` From 450817c300b145b871e52a36c7eabb476c1e9818 Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Fri, 25 Mar 2022 12:57:38 +0300 Subject: [PATCH 6/6] Update DatabaseManagementSystemChangeStep.cs --- .../Steps/DatabaseManagementSystemChangeStep.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/DatabaseManagementSystemChangeStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/DatabaseManagementSystemChangeStep.cs index 062868a99c..f014942486 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/DatabaseManagementSystemChangeStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/DatabaseManagementSystemChangeStep.cs @@ -81,12 +81,12 @@ public class DatabaseManagementSystemChangeStep : ProjectBuildPipelineStep private void ChangeEntityFrameworkCoreDependency(ProjectBuildContext context, string newPackageName, string newModuleNamespace, string newModuleClass) { - var efCoreProjectFile = context.Files.First(f => f.Name.EndsWith("EntityFrameworkCore.csproj", StringComparison.OrdinalIgnoreCase)); - efCoreProjectFile.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newPackageName); + var efCoreProjectFile = context.Files.FirstOrDefault(f => f.Name.EndsWith("EntityFrameworkCore.csproj", StringComparison.OrdinalIgnoreCase)); + efCoreProjectFile?.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newPackageName); - var efCoreModuleClass = context.Files.First(f => f.Name.EndsWith("EntityFrameworkCoreModule.cs", StringComparison.OrdinalIgnoreCase)); - efCoreModuleClass.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newModuleNamespace); - efCoreModuleClass.ReplaceText("AbpEntityFrameworkCoreSqlServerModule", newModuleClass); + var efCoreModuleClass = context.Files.FirstOrDefault(f => f.Name.EndsWith("EntityFrameworkCoreModule.cs", StringComparison.OrdinalIgnoreCase)); + efCoreModuleClass?.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newModuleNamespace); + efCoreModuleClass?.ReplaceText("AbpEntityFrameworkCoreSqlServerModule", newModuleClass); } private void ChangeUseSqlServer(ProjectBuildContext context, string newUseMethodForEfModule, string newUseMethodForDbContext = null)