Chain.NET(a.k.a. NChain)

Overview
News
Release notes
License
Architecture
API documentation
Five minutes tutorial (VB)
Five minutes tutorial (C#)
Examples
Code repository
Download
Forums
Mailing list
Feature request
Bugs reporting
 
SourceForge.net Logo

Architecture

Class diagram

There are few base interfaces inside Chain.NET library that allow to implement standard CoR pattern. These interfaces are:

- ICommand
- IFilter
- IChain
- IContext

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 IChain when IFilter's execute method was previously executed.

IChain interface represents ordered set of ICommands that are needed to process particular IContext. It extends standard ICommand interface.

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).

Base implamantations:

ChainBase class - base implementation of IChain interface.
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 IContext interface.
This class inherits from standard Hashtable class available in System.Collections namespace.
ContextBase class delivers standard context functionality.

Abstract 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(true/false) to signalize its execution result.

See Chain.NET library API documentation here for detailed architecture description.
 
Copyright 2007-2008 Pawel Stasiak