fix: 调用方适配ConcurrentDictionary(Add→TryAdd、Remove→TryRemove),与ACP P0提交对齐
This commit is contained in:
@@ -208,7 +208,7 @@ namespace ADP.ViewModels
|
|||||||
SilenceBuzzerCommand = new AsyncDelegateCommand(SilenceBuzzer);
|
SilenceBuzzerCommand = new AsyncDelegateCommand(SilenceBuzzer);
|
||||||
GoBackCommand = new DelegateCommand(OnGoBack);
|
GoBackCommand = new DelegateCommand(OnGoBack);
|
||||||
|
|
||||||
_globalInfo.ContextDic.Add("default", new ScopedContext());
|
_globalInfo.ContextDic.TryAdd("default", new ScopedContext());
|
||||||
|
|
||||||
_eventAggregator.GetEvent<LoginSuccessEvent>().Subscribe(() =>
|
_eventAggregator.GetEvent<LoginSuccessEvent>().Subscribe(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -217,10 +217,10 @@ namespace MainModule.ViewModels
|
|||||||
(LogAreaVM as IDisposable)?.Dispose();
|
(LogAreaVM as IDisposable)?.Dispose();
|
||||||
(ParametersManagerVM as IDisposable)?.Dispose();
|
(ParametersManagerVM as IDisposable)?.Dispose();
|
||||||
|
|
||||||
_globalInfo.ContextDic?.Remove(TestStatus);
|
_globalInfo.ContextDic?.TryRemove(TestStatus, out _);
|
||||||
_globalInfo.StepRunningDic?.Remove(TestStatus);
|
_globalInfo.StepRunningDic?.TryRemove(TestStatus, out _);
|
||||||
_globalInfo.ConfigDic?.Remove(TestStatus);
|
_globalInfo.ConfigDic?.TryRemove(TestStatus, out _);
|
||||||
_globalInfo.ScopeDic?.Remove(TestStatus);
|
_globalInfo.ScopeDic?.TryRemove(TestStatus, out _);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -275,10 +275,10 @@ namespace MainModule.ViewModels
|
|||||||
if (navigationContext.Parameters.ContainsKey("Name"))
|
if (navigationContext.Parameters.ContainsKey("Name"))
|
||||||
{
|
{
|
||||||
TestStatus = navigationContext.Parameters.GetValue<string>("Name");
|
TestStatus = navigationContext.Parameters.GetValue<string>("Name");
|
||||||
_globalInfo.ContextDic.Add(TestStatus, _scopedContext);
|
_globalInfo.ContextDic.TryAdd(TestStatus, _scopedContext);
|
||||||
_globalInfo.StepRunningDic.Add(TestStatus, _stepRunning);
|
_globalInfo.StepRunningDic.TryAdd(TestStatus, _stepRunning);
|
||||||
_globalInfo.ScopeDic.Add(TestStatus, _scope);
|
_globalInfo.ScopeDic.TryAdd(TestStatus, _scope);
|
||||||
_globalInfo.ConfigDic.Add(TestStatus, _systemConfig);
|
_globalInfo.ConfigDic.TryAdd(TestStatus, _systemConfig);
|
||||||
if(_systemConfig.DefaultProgramFilePath != null&&File.Exists(_systemConfig.DefaultProgramFilePath))
|
if(_systemConfig.DefaultProgramFilePath != null&&File.Exists(_systemConfig.DefaultProgramFilePath))
|
||||||
{
|
{
|
||||||
var filePath = _systemConfig.DefaultProgramFilePath;
|
var filePath = _systemConfig.DefaultProgramFilePath;
|
||||||
|
|||||||
Reference in New Issue
Block a user