Browse Source
Merge pull request #12079 from abpframework/auto-merge/rel-5-2/949
Merge branch dev with rel-5.2
pull/12085/head
maliming
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
23 additions and
19 deletions
-
docs/en/Distributed-Locking.md
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/DatabaseManagementSystemChangeStep.cs
-
npm/ng-packs/packages/core/src/lib/models/environment.ts
|
|
|
@ -27,21 +27,25 @@ using Medallion.Threading.Redis; |
|
|
|
|
|
|
|
namespace AbpDemo |
|
|
|
{ |
|
|
|
public class MyModule : AbpModule |
|
|
|
{ |
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var configuration = context.Services.GetConfiguration(); |
|
|
|
|
|
|
|
context.Services.AddSingleton<IDistributedLockProvider>(sp => |
|
|
|
{ |
|
|
|
var connection = ConnectionMultiplexer |
|
|
|
[DependsOn( |
|
|
|
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<IDistributedLockProvider>(sp => |
|
|
|
{ |
|
|
|
var connection = ConnectionMultiplexer |
|
|
|
.Connect(configuration["Redis:Configuration"]); |
|
|
|
return new |
|
|
|
return new |
|
|
|
RedisDistributedSynchronizationProvider(connection.GetDatabase()); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
```` |
|
|
|
|
|
|
|
|
|
|
|
@ -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) |
|
|
|
|
|
|
|
@ -10,8 +10,8 @@ export interface Environment { |
|
|
|
oAuthConfig: AuthConfig; |
|
|
|
production: boolean; |
|
|
|
remoteEnv?: RemoteEnv; |
|
|
|
[key:string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
|
|
} |
|
|
|
|
|
|
|
export interface ApplicationInfo { |
|
|
|
name: string; |
|
|
|
baseUrl?: string; |
|
|
|
|