Class AutomationProcessContextExtensions
- Namespace
- CMS.Automation
- Assembly
- CMS.Automation.dll
Extension methods for AutomationProcessContext that identify which trigger started the process.
public static class AutomationProcessContextExtensions
- Inheritance
-
objectAutomationProcessContextExtensions
Methods
TriggeredByCustomActivity(AutomationProcessContext, CancellationToken)
Determines whether the automation process was started by the custom-activity trigger.
public static Task<bool> TriggeredByCustomActivity(this AutomationProcessContext context, CancellationToken cancellationToken = default)
Parameters
contextAutomationProcessContextContext of the automation process executing the action.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<bool>
truewhen the process was started by the custom-activity trigger; otherwisefalse.
Exceptions
- ArgumentNullException
Thrown when
contextis null.
TriggeredByFormSubmission(AutomationProcessContext, CancellationToken)
Determines whether the automation process was started by the form-submission trigger.
public static Task<bool> TriggeredByFormSubmission(this AutomationProcessContext context, CancellationToken cancellationToken = default)
Parameters
contextAutomationProcessContextContext of the automation process executing the action.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<bool>
truewhen the process was started by the form-submission trigger; otherwisefalse.
Exceptions
- ArgumentNullException
Thrown when
contextis null.
TriggeredByRegistration(AutomationProcessContext, CancellationToken)
Determines whether the automation process was started by the member-registration trigger.
public static Task<bool> TriggeredByRegistration(this AutomationProcessContext context, CancellationToken cancellationToken = default)
Parameters
contextAutomationProcessContextContext of the automation process executing the action.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<bool>
truewhen the process was started by the member-registration trigger; otherwisefalse.
Exceptions
- ArgumentNullException
Thrown when
contextis null.