初步完成数据处理链条
This commit is contained in:
22
DMS.Application/Services/Processors/LoggingProcessor.cs
Normal file
22
DMS.Application/Services/Processors/LoggingProcessor.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using DMS.Application.Interfaces;
|
||||
using DMS.Application.Models;
|
||||
|
||||
|
||||
namespace DMS.Application.Services.Processors;
|
||||
|
||||
/// <summary>
|
||||
/// 一个简单的数据处理器实现,用于演示。
|
||||
/// 其主要功能是记录接收到的变量数据的名称和值。
|
||||
/// </summary>
|
||||
public class LoggingProcessor : IVariableProcessor
|
||||
{
|
||||
public LoggingProcessor()
|
||||
{
|
||||
}
|
||||
|
||||
public Task ProcessAsync(VariableContext context)
|
||||
{
|
||||
// NlogHelper.Info($"处理数据: {context.Data.Name}, 值: {context.Data.DataValue}");
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user