消除所有错误,重新构建
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using DMS.Core.Helper;
|
||||
using DMS.Core.Models;
|
||||
using DMS.Helper;
|
||||
using DMS.WPF.Models;
|
||||
using DMS.WPF.Services;
|
||||
|
||||
namespace DMS.Services.Processors;
|
||||
|
||||
@@ -14,19 +16,19 @@ public class CheckValueChangedProcessor : IVariableProcessor
|
||||
public Task ProcessAsync(VariableContext context)
|
||||
{
|
||||
Variable newVariable = context.Data;
|
||||
if (!_dataServices.AllVariables.TryGetValue(newVariable.Id, out Variable oldVariable))
|
||||
{
|
||||
NlogHelper.Warn($"检查变量值是否改变时在_dataServices.AllVariables中找不到Id:{newVariable.Id},Name:{newVariable.Name}的变量。");
|
||||
context.IsHandled = true;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
// if (!_dataServices.AllVariables.TryGetValue(newVariable.Id, out Variable oldVariable))
|
||||
// {
|
||||
// NlogHelper.Warn($"检查变量值是否改变时在_dataServices.AllVariables中找不到Id:{newVariable.Id},Name:{newVariable.Name}的变量。");
|
||||
// context.IsHandled = true;
|
||||
// return Task.CompletedTask;
|
||||
// }
|
||||
|
||||
if (newVariable.DataValue == oldVariable.DataValue)
|
||||
{
|
||||
// 值没有变化,直接完成
|
||||
context.IsHandled = true;
|
||||
}
|
||||
|
||||
// if (newVariable.DataValue == oldVariable.DataValue)
|
||||
// {
|
||||
// // 值没有变化,直接完成
|
||||
// context.IsHandled = true;
|
||||
// }
|
||||
//
|
||||
// 在这里处理 context.Data
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user