change - 格式化

dev
wenjy 7 months ago
parent 61e8529374
commit 530a6e92cb

@ -57,13 +57,19 @@ namespace SlnMesnac.Business.@base
/// </summary> /// </summary>
public readonly List<RfidAbsractFactory> _rfidFactories; public readonly List<RfidAbsractFactory> _rfidFactories;
/// <summary>
/// 容器
/// </summary>
private IServiceProvider _serviceProvider;
#region 本地缓存信息
private List<RealPalletTask> palletTasks; private List<RealPalletTask> palletTasks;
private List<RealBarCodeTask> barCodeTasks; private List<RealBarCodeTask> barCodeTasks;
private List<BaseConfigInfo> baseConfigInfos; private List<BaseConfigInfo> baseConfigInfos;
#endregion
private IServiceProvider _serviceProvider;
/// <summary> /// <summary>
/// 刷新日志信息 /// 刷新日志信息
@ -251,6 +257,5 @@ namespace SlnMesnac.Business.@base
throw new InvalidOperationException($"根据Key获取PLC地址异常:{ex.Message}"); throw new InvalidOperationException($"根据Key获取PLC地址异常:{ex.Message}");
} }
} }
} }
} }

@ -67,16 +67,9 @@ namespace SlnMesnac.Extensions
return Db; return Db;
}); });
//private IServiceProvider _serviceProvider;
//using (var scope = _serviceProvider.CreateScope())
//{
// var configInfos = scope.ServiceProvider.GetRequiredService<List<RealPalletTask>>();
//}
//缓存本机配置 //缓存本机配置
services.AddSingleton<List<BaseConfigInfo>>(x => services.AddSingleton<List<BaseConfigInfo>>(x =>
{ {
var service = x.GetService<IBaseConfigInfoService>(); var service = x.GetService<IBaseConfigInfoService>();
var info = service.Query(x => x.IsFlag == 1); var info = service.Query(x => x.IsFlag == 1);

Loading…
Cancel
Save