protected override ScriptAction Convert(string monitorContextId, WriteListItem listItemMessage) { var itemName = GetDatapoolItemFullName(listItemMessage.ItemId); return(ScriptAction.CreateAwaitedContextMethodCall(monitorContextId, nameof(IMonitorContext.WriteDatapoolList), CreateParameterList(itemName, listItemMessage.Index, listItemMessage.Value))); }
protected override ScriptAction Convert(string monitorContextId, RemoveListItem removeMessage) { var itemName = GetDatapoolItemFullName(removeMessage.ItemId); return(ScriptAction.CreateAwaitedContextMethodCall(monitorContextId, nameof(IMonitorContext.RemoveDatapoolListItem), CreateParameterList(itemName, removeMessage.Index))); }
protected override ScriptAction Convert(string monitorContextId, FireEvent eventMessage) { var eventName = GetEventFullName(eventMessage.EventId, eventMessage.GroupId); return(ScriptAction.CreateAwaitedContextMethodCall(monitorContextId, nameof(IMonitorContext.FireEvent), CreateParameterList(eventName).Concat(CreateParameterList(eventMessage.Parameters)))); }