Merge pull request #12079 from abpframework/auto-merge/rel-5-2/949

Merge branch dev with rel-5.2
pull/12085/head
maliming 4 years ago committed by GitHub
commit 98e70149a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,21 +27,25 @@ using Medallion.Threading.Redis;
namespace AbpDemo namespace AbpDemo
{ {
public class MyModule : AbpModule [DependsOn(
{ typeof(AbpDistributedLockingModule)
public override void ConfigureServices(ServiceConfigurationContext context) //If you have the other dependencies, you should do here
{ )]
var configuration = context.Services.GetConfiguration(); public class MyModule : AbpModule
{
context.Services.AddSingleton<IDistributedLockProvider>(sp => public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var connection = ConnectionMultiplexer var configuration = context.Services.GetConfiguration();
context.Services.AddSingleton<IDistributedLockProvider>(sp =>
{
var connection = ConnectionMultiplexer
.Connect(configuration["Redis:Configuration"]); .Connect(configuration["Redis:Configuration"]);
return new return new
RedisDistributedSynchronizationProvider(connection.GetDatabase()); RedisDistributedSynchronizationProvider(connection.GetDatabase());
}); });
} }
} }
} }
```` ````

@ -81,12 +81,12 @@ public class DatabaseManagementSystemChangeStep : ProjectBuildPipelineStep
private void ChangeEntityFrameworkCoreDependency(ProjectBuildContext context, string newPackageName, string newModuleNamespace, string newModuleClass) private void ChangeEntityFrameworkCoreDependency(ProjectBuildContext context, string newPackageName, string newModuleNamespace, string newModuleClass)
{ {
var efCoreProjectFile = context.Files.First(f => f.Name.EndsWith("EntityFrameworkCore.csproj", StringComparison.OrdinalIgnoreCase)); var efCoreProjectFile = context.Files.FirstOrDefault(f => f.Name.EndsWith("EntityFrameworkCore.csproj", StringComparison.OrdinalIgnoreCase));
efCoreProjectFile.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newPackageName); efCoreProjectFile?.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newPackageName);
var efCoreModuleClass = context.Files.First(f => f.Name.EndsWith("EntityFrameworkCoreModule.cs", StringComparison.OrdinalIgnoreCase)); var efCoreModuleClass = context.Files.FirstOrDefault(f => f.Name.EndsWith("EntityFrameworkCoreModule.cs", StringComparison.OrdinalIgnoreCase));
efCoreModuleClass.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newModuleNamespace); efCoreModuleClass?.ReplaceText("Volo.Abp.EntityFrameworkCore.SqlServer", newModuleNamespace);
efCoreModuleClass.ReplaceText("AbpEntityFrameworkCoreSqlServerModule", newModuleClass); efCoreModuleClass?.ReplaceText("AbpEntityFrameworkCoreSqlServerModule", newModuleClass);
} }
private void ChangeUseSqlServer(ProjectBuildContext context, string newUseMethodForEfModule, string newUseMethodForDbContext = null) private void ChangeUseSqlServer(ProjectBuildContext context, string newUseMethodForEfModule, string newUseMethodForDbContext = null)

@ -10,8 +10,8 @@ export interface Environment {
oAuthConfig: AuthConfig; oAuthConfig: AuthConfig;
production: boolean; production: boolean;
remoteEnv?: RemoteEnv; remoteEnv?: RemoteEnv;
[key:string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any
} }
export interface ApplicationInfo { export interface ApplicationInfo {
name: string; name: string;
baseUrl?: string; baseUrl?: string;

Loading…
Cancel
Save