fix: GlobalInfo四个作用域字典改为ConcurrentDictionary提升线程安全
This commit is contained in:
@@ -12,10 +12,14 @@ namespace UIShare.GlobalVariable
|
||||
public class GlobalInfo:BindableBase
|
||||
{
|
||||
public event EventHandler? ScopeChanged;
|
||||
public Dictionary<string,ScopedContext> ContextDic { get; set; }
|
||||
public Dictionary<string,StepRunning> StepRunningDic { get; set; }
|
||||
public Dictionary<string, SystemConfig> ConfigDic { get; set; }
|
||||
public Dictionary<string, IScopedProvider> ScopeDic { get; set; }
|
||||
/// <summary>作用域名 → 作用域上下文(线程安全:可能被多个作用域并发创建/销毁)</summary>
|
||||
public ConcurrentDictionary<string, ScopedContext> ContextDic { get; set; }
|
||||
/// <summary>作用域名 → 测试运行器(线程安全:可能被多个作用域并发创建/销毁)</summary>
|
||||
public ConcurrentDictionary<string, StepRunning> StepRunningDic { get; set; }
|
||||
/// <summary>作用域名 → 系统配置(线程安全:可能被多个作用域并发创建/销毁)</summary>
|
||||
public ConcurrentDictionary<string, SystemConfig> ConfigDic { get; set; }
|
||||
/// <summary>作用域名 → 作用域容器(线程安全:可能被多个作用域并发创建/销毁)</summary>
|
||||
public ConcurrentDictionary<string, IScopedProvider> ScopeDic { get; set; }
|
||||
|
||||
/// <summary>硬件指纹 → 设备实例的并发池,确保同一物理硬件全局只创建一个驱动实例。</summary>
|
||||
public ConcurrentDictionary<string, Lazy<IBaseInterface>> HardwarePool { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user