mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-13 03:16:35 +08:00
将FlowTrigger触发器整合成接口的形式方便替换
This commit is contained in:
@@ -4,7 +4,7 @@ using Serein.Library;
|
||||
namespace Net462DllTest.Trigger
|
||||
{
|
||||
[AutoRegister]
|
||||
public class PrakingDevice : FlowTrigger<ParkingCommand>
|
||||
public class PrakingDevice : TaskFlowTrigger<ParkingCommand>
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Net462DllTest.Trigger
|
||||
|
||||
|
||||
[AutoRegister]
|
||||
public class SiemensPlcDevice : FlowTrigger<PlcVarName>
|
||||
public class SiemensPlcDevice : TaskFlowTrigger<PlcVarName>
|
||||
{
|
||||
public SiemensClient Client { get; set; }
|
||||
public SiemensVersion Version { get; set; }
|
||||
@@ -197,7 +197,7 @@ namespace Net462DllTest.Trigger
|
||||
if (isNotification)
|
||||
{
|
||||
Console.WriteLine($"VarName: {signal}\t\tOld Data: {oldData}\tNew Data: {newData}");
|
||||
Trigger(signal, newData);
|
||||
await InvokeTriggerAsync(signal, newData);
|
||||
}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace Net462DllTest.Trigger
|
||||
{
|
||||
return VarInfoDict[plcVarEnum];
|
||||
}
|
||||
var plcValue = EnumHelper.GetBoundValue<PlcVarName, PlcVarInfoAttribute, PlcVarInfo>(plcVarEnum, attr => attr.Info)
|
||||
var plcValue = EnumHelper.GetAttributeValue<PlcVarName, PlcVarInfoAttribute, PlcVarInfo>(plcVarEnum, attr => attr.Info)
|
||||
?? throw new Exception($"获取变量异常:{plcVarEnum},没有标记PlcValueAttribute");
|
||||
if (string.IsNullOrEmpty(plcValue.Address))
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Net462DllTest.Trigger
|
||||
/// 视图管理
|
||||
/// </summary>
|
||||
[AutoRegister]
|
||||
public class ViewManagement : FlowTrigger<CommandSignal>
|
||||
public class ViewManagement : TaskFlowTrigger<CommandSignal>
|
||||
{
|
||||
private readonly UIContextOperation uiContextOperation;
|
||||
public ViewManagement(UIContextOperation uiContextOperation)
|
||||
|
||||
Reference in New Issue
Block a user