Class TriggerTask
Inherited Members
Namespace: LemonEdge.API.Core.Tasks.Processors.Triggers
Assembly: LemonEdge.API.dll
Syntax
[ServerTask("Trigger Task", "12737356-A000-436B-8640-C18406499341", typeof(TriggerActionParameter), Description = "Performs the specified Trigger Action on matching triggers that valid Trigger Gates have activated.")]
public class TriggerTask : BaseTriggerTask, ITaskProcessor, IProcessor, IDisposable
Constructors
TriggerTask(IServerTaskFactory)
Declaration
public TriggerTask(IServerTaskFactory serverTaskFactory)
Parameters
Type | Name | Description |
---|---|---|
IServerTaskFactory | serverTaskFactory |
Properties
Action
A custom action string for matching against a TriggeredActionParameter
Declaration
protected override string Action { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
ForID
The list of entitiy ids this action is triggered against
Declaration
protected override Guid? ForID { get; }
Property Value
Type | Description |
---|---|
Guid? |
Overrides
ForTypes
The types of entities this action is triggered against
Declaration
protected override Guid[] ForTypes { get; }
Property Value
Type | Description |
---|---|
Guid[] |
Overrides
MyParam
Declaration
protected TriggerActionParameter MyParam { get; }
Property Value
Type | Description |
---|---|
TriggerActionParameter |
TimeStamp
The timestamp of the changes that occured that triggered this action
Declaration
protected override DateTimeOffset? TimeStamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset? |
Overrides
TriggerID
The IActionTrigger that triggered this action
Declaration
protected override Guid? TriggerID { get; }
Property Value
Type | Description |
---|---|
Guid? |
Overrides
TriggeredContexts
A list of the contexts that triggered this action
Declaration
protected override IDictionary<IActionTrigger, List<TriggerContext>> TriggeredContexts { get; }
Property Value
Type | Description |
---|---|
IDictionary<IActionTrigger, List<TriggerContext>> |
Overrides
Methods
ProcessTriggers(IDictionary<IActionTrigger, List<TriggerContext>>, CancellationToken)
Processes the items that have been triggered by the IActionTrigger
Declaration
protected override Task ProcessTriggers(IDictionary<IActionTrigger, List<TriggerContext>> triggeredItem, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<IActionTrigger, List<TriggerContext>> | triggeredItem | A dictionary of each triggered item and the contexts that triggered it |
CancellationToken | cancel | A cancellation token for cancelling the task process |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |