2025-10-02 18:47:45 +08:00
|
|
|
|
using DMS.Application.Events;
|
|
|
|
|
|
using DMS.Application.Interfaces;
|
2025-09-15 20:54:32 +08:00
|
|
|
|
using DMS.Application.Models;
|
|
|
|
|
|
using DMS.Core.Events;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DMS.Application.Services.Processors;
|
|
|
|
|
|
|
|
|
|
|
|
public class UpdateViewProcessor: IVariableProcessor
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly IEventService _eventService;
|
|
|
|
|
|
|
|
|
|
|
|
public UpdateViewProcessor(IEventService eventService)
|
|
|
|
|
|
{
|
|
|
|
|
|
_eventService = eventService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async Task ProcessAsync(VariableContext context)
|
|
|
|
|
|
{
|
|
|
|
|
|
// 触发变量值变更事件
|
|
|
|
|
|
var eventArgs = new VariableValueChangedEventArgs(
|
2025-10-02 18:47:45 +08:00
|
|
|
|
context.Data,
|
|
|
|
|
|
context.Data.DataValue);
|
2025-09-15 20:54:32 +08:00
|
|
|
|
|
2025-10-02 18:47:45 +08:00
|
|
|
|
_eventService.RaiseVariableValueChanged(this, eventArgs);
|
2025-09-15 20:54:32 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|