There are few base interfaces inside Chain.NET library that allow to implement standard CoR pattern. These interfaces are:
ICommand interface represents unit of work that can be performed (taking particular execution state under consideration).
IFilter interface is standard
ICommand extended by
postProcess method executed always by
execute method was previously executed.
IChain interface represents ordered set of
ICommands that are needed to process particular
IContext. It extends standard
IContext interface represents execution context (state information) that should be available for commands (commands in same
IChain can comunicate threw it or return execution result via it).
ChainBase class - base implementation of
This class brings basic "chain" functionality. It allows to process particular context by passing it to commands
that belong to the chain - commands which are supposed to process the context.
ChainBase class delivers appropriate methods for adding new commands to the chain(appropriate methods for command removal are also available).
ContextBase class - base implementation of
This class inherits from standard
Hashtable class available in
ContextBase class delivers standard context functionality.
CommandBase class is available to deliver constants that
are used by command to signalize its execution result.
Inheritance from this class is not obligatory for particular chain's commands - command may return value defined under those constants(
false) to signalize its execution result.
See Chain.NET library API documentation here for detailed architecture description.