Class AutomationTrigger
- Namespace
- CMS.Automation
- Assembly
- CMS.Automation.dll
Base class for custom automation triggers without typed trigger data. Extend this class to define a custom trigger that can be fired from code via FireTrigger<TTrigger>(AutomationTriggerDispatch, CancellationToken). A single instance is created and reused across all evaluations, so implementations must be stateless.
public abstract class AutomationTrigger : IAutomationTrigger
- Inheritance
-
objectAutomationTrigger
- Implements
- Extension Methods
Constructors
AutomationTrigger()
protected AutomationTrigger()
Methods
Evaluate(AutomationTriggerContext, CancellationToken)
Returns whether the configured automation process should start for the object described by context.
Override to gate the trigger; the default implementation always allows the process to start.
public virtual Task<bool> Evaluate(AutomationTriggerContext context, CancellationToken cancellationToken)
Parameters
contextAutomationTriggerContextInformation about the object the trigger was fired for.
cancellationTokenCancellationTokenCancellation token.