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, IProbeSiteType 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
- contextBehaviorContext<TInstance>
- The behavior context 
- nextBehavior<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
- contextBehaviorContext<TInstance, T>
- The behavior context 
- nextBehavior<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 : ExceptionParameters
- contextBehaviorExceptionContext<TInstance, TException>
- nextBehavior<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 : ExceptionParameters
- contextBehaviorExceptionContext<TInstance, T, TException>
- nextBehavior<TInstance, T>
Returns
Type Parameters
- T
- TException