初步完成数据处理链条

This commit is contained in:
2025-09-04 13:40:07 +08:00
parent bdae3355aa
commit bc8bc58d9b
18 changed files with 175 additions and 345 deletions

View File

@@ -0,0 +1,33 @@
using DMS.Core.Helper;
using DMS.Core.Models;
using DMS.Application.Interfaces;
using DMS.Application.Models;
namespace DMS.Application.Services.Processors;
public class CheckValueChangedProcessor : IVariableProcessor
{
public CheckValueChangedProcessor()
{
}
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 (newVariable.DataValue == oldVariable.DataValue)
// {
// // 值没有变化,直接完成
// context.IsHandled = true;
// }
//
// 在这里处理 context.Data
return Task.CompletedTask;
}
}