Interface Behavior<TInstance>
- Namespace
- Automatonymous
- Assembly
- Automatonymous.dll
A behavior is a chain of activities invoked by a state
public interface Behavior<in TInstance> : Visitable, IProbeSiteType Parameters
- TInstance
- The state type 
- Inherited Members
Methods
Execute(BehaviorContext<TInstance>)
Execute the activity with the given behavior context
Task Execute(BehaviorContext<in TInstance> context)Parameters
- contextBehaviorContext<TInstance>
- The behavior context 
Returns
- Task
- An awaitable task 
Execute<T>(BehaviorContext<TInstance, T>)
Execute the activity with the given behavior context
Task Execute<T>(BehaviorContext<in TInstance, T> context)Parameters
- contextBehaviorContext<TInstance, T>
- The behavior context 
Returns
- Task
- An awaitable task 
Type Parameters
- T
Faulted<TException>(BehaviorExceptionContext<TInstance, TException>)
The exception path through the behavior allows activities to catch and handle exceptions
Task Faulted<TException>(BehaviorExceptionContext<in TInstance, TException> context) where TException : ExceptionParameters
- contextBehaviorExceptionContext<TInstance, TException>
Returns
Type Parameters
- TException
Faulted<T, TException>(BehaviorExceptionContext<TInstance, T, TException>)
The exception path through the behavior allows activities to catch and handle exceptions
Task Faulted<T, TException>(BehaviorExceptionContext<in TInstance, T, TException> context) where TException : ExceptionParameters
- contextBehaviorExceptionContext<TInstance, T, TException>
Returns
Type Parameters
- T
- TException