Interface Activity<TInstance>
- Namespace
- Automatonymous
- Assembly
- Automatonymous.dll
An activity is part of a behavior that is executed in order
public interface Activity<TInstance> : Activity, Visitable, IProbeSite
Type Parameters
TInstance
- Inherited Members
Methods
Execute(BehaviorContext<TInstance>, Behavior<TInstance>)
Execute the activity with the given behavior context
Task Execute(BehaviorContext<TInstance> context, Behavior<TInstance> next)
Parameters
context
BehaviorContext<TInstance>The behavior context
next
Behavior<TInstance>The behavior that follows this activity
Returns
- Task
An awaitable task
Execute<T>(BehaviorContext<TInstance, T>, Behavior<TInstance, T>)
Execute the activity with the given behavior context
Task Execute<T>(BehaviorContext<TInstance, T> context, Behavior<TInstance, T> next)
Parameters
context
BehaviorContext<TInstance, T>The behavior context
next
Behavior<TInstance, T>The behavior that follows this activity
Returns
- Task
An awaitable task
Type Parameters
T
Faulted<TException>(BehaviorExceptionContext<TInstance, TException>, Behavior<TInstance>)
The exception path through the behavior allows activities to catch and handle exceptions
Task Faulted<TException>(BehaviorExceptionContext<TInstance, TException> context, Behavior<TInstance> next) where TException : Exception
Parameters
context
BehaviorExceptionContext<TInstance, TException>next
Behavior<TInstance>
Returns
Type Parameters
TException
Faulted<T, TException>(BehaviorExceptionContext<TInstance, T, TException>, Behavior<TInstance, T>)
The exception path through the behavior allows activities to catch and handle exceptions
Task Faulted<T, TException>(BehaviorExceptionContext<TInstance, T, TException> context, Behavior<TInstance, T> next) where TException : Exception
Parameters
context
BehaviorExceptionContext<TInstance, T, TException>next
Behavior<TInstance, T>
Returns
Type Parameters
T
TException