重构代码:根据最新的Longbow组件调整工程Setup类服务注入代码
This commit is contained in:
parent
c950fd744d
commit
8f5ee8b373
|
@ -44,8 +44,8 @@ namespace Bootstrap.Admin
|
||||||
});
|
});
|
||||||
services.AddCors();
|
services.AddCors();
|
||||||
services.AddLogging(builder => builder.AddFileLogger().AddDBLogger(ExceptionsHelper.Log));
|
services.AddLogging(builder => builder.AddFileLogger().AddDBLogger(ExceptionsHelper.Log));
|
||||||
services.AddConfigurationManager();
|
services.AddConfigurationManager(Configuration);
|
||||||
services.AddCacheManager();
|
services.AddCacheManager(Configuration);
|
||||||
services.AddDbAdapter(() => { CacheManager.Clear(); CacheManager.CorsClear(new List<string>() { "*" }); });
|
services.AddDbAdapter(() => { CacheManager.Clear(); CacheManager.CorsClear(new List<string>() { "*" }); });
|
||||||
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
|
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
|
||||||
.SetApplicationName(Configuration["ApplicationName"])
|
.SetApplicationName(Configuration["ApplicationName"])
|
||||||
|
|
|
@ -44,8 +44,8 @@ namespace Bootstrap.Client
|
||||||
});
|
});
|
||||||
services.AddCors();
|
services.AddCors();
|
||||||
services.AddLogging(builder => builder.AddFileLogger());
|
services.AddLogging(builder => builder.AddFileLogger());
|
||||||
services.AddConfigurationManager();
|
services.AddConfigurationManager(Configuration);
|
||||||
services.AddCacheManager();
|
services.AddCacheManager(Configuration);
|
||||||
services.AddDbAdapter();
|
services.AddDbAdapter();
|
||||||
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
|
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
|
||||||
.SetApplicationName(Configuration["ApplicationName"])
|
.SetApplicationName(Configuration["ApplicationName"])
|
||||||
|
|
Loading…
Reference in New Issue