Table of Contents

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, IProbeSite

Type 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

context BehaviorContext<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

context BehaviorContext<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 : Exception

Parameters

context BehaviorExceptionContext<TInstance, TException>

Returns

Task

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 : Exception

Parameters

context BehaviorExceptionContext<TInstance, T, TException>

Returns

Task

Type Parameters

T
TException