Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Design Patterns 3 of 3 - Behavioral Design Patterns

, 10 Jan 2013
In this last article about design patterns I will discuss about behavioral design patterns and I will show on real examples how to implement them.
Prize winner in Competition "Best overall article of September 2012"
BehavioralPatterns_RealWorldExamples-noexe.zip
ChainOfResponsibilityPattern
bin
Debug
ChainOfResponsibilityPattern.vshost.exe.manifest
ConcreteHandlers
HandlerBase
obj
x86
Debug
Properties
CommandPattern
bin
Debug
CommandPattern.vshost.exe.manifest
ClassDiagram1.cd
ClassDiagram2.cd
CommandBase
ConcreteCommands
Invoker
obj
x86
Debug
Properties
Receiver
InterpreterPattern
ExpressionBase
NonterminalExpressions
obj
x86
Debug
Properties
TerminalExpression
IteratorPattern
AggregateBase
ConcreteAggregate
ConcreteIterator
IteratorBase
obj
x86
Debug
Properties
MediatorPattern
ColleagueBase
ConcreteColleagues
ConcreteMediator
MediatorBase
obj
x86
Debug
Properties
MementoPattern
bin
Debug
MementoPattern.vshost.exe.manifest
Caretaker
Memento
obj
x86
Debug
Originator
Properties
ObserverPattern
ConcreteObservers
ConcreteSubject
obj
x86
Debug
ObserverBase
Properties
SubjectBase
StatePattern
bin
Debug
StatePattern.vshost.exe.manifest
ConcreteStates
Context
obj
x86
Debug
Properties
StateBase
StrategyPattern
bin
Debug
StrategyPattern.vshost.exe.manifest
ConcreteStretegies
obj
x86
Debug
Properties
StrategyBase
TemplateMethodPattern
AlgorithmBase
bin
Debug
TemplateMethodPattern.vshost.exe.manifest
obj
x86
Debug
Properties
VistorPattern
ConcreteElements
ConcreteVisitors
ElementBase
ObjectStructure
obj
x86
Debug
Properties
VisitorBase
BehavioralPatterns_RealWorldExamples.zip
ChainOfResponsibilityPattern.exe
ChainOfResponsibilityPattern.pdb
ChainOfResponsibilityPattern.vshost.exe
ChainOfResponsibilityPattern.vshost.exe.manifest
Release
ChainOfResponsibilityPattern.exe
ChainOfResponsibilityPattern.pdb
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
CommandPattern.exe
CommandPattern.pdb
CommandPattern.vshost.exe
CommandPattern.vshost.exe.manifest
Release
ClassDiagram1.cd
ClassDiagram2.cd
CommandPattern.exe
CommandPattern.pdb
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
bin
Debug
InterpreterPattern.exe
InterpreterPattern.pdb
InterpreterPattern.vshost.exe
Release
Client
Context
DesignTimeResolveAssemblyReferencesInput.cache
InterpreterPattern.exe
InterpreterPattern.pdb
TempPE
bin
Debug
IteratorPattern.exe
IteratorPattern.pdb
IteratorPattern.vshost.exe
Release
DesignTimeResolveAssemblyReferencesInput.cache
IteratorPattern.exe
IteratorPattern.pdb
TempPE
bin
Debug
MediatorPattern.exe
MediatorPattern.pdb
MediatorPattern.vshost.exe
Release
DesignTimeResolveAssemblyReferencesInput.cache
MediatorPattern.exe
MediatorPattern.pdb
TempPE
MementoPattern.exe
MementoPattern.pdb
MementoPattern.vshost.exe
MementoPattern.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
MementoPattern.exe
MementoPattern.pdb
TempPE
bin
Debug
ObserverPattern.exe
ObserverPattern.pdb
ObserverPattern.vshost.exe
Release
DesignTimeResolveAssemblyReferencesInput.cache
ObserverPattern.exe
ObserverPattern.pdb
TempPE
StatePattern.exe
StatePattern.pdb
StatePattern.vshost.exe
StatePattern.vshost.exe.manifest
Release
DesignTimeResolveAssemblyReferencesInput.cache
StatePattern.exe
StatePattern.pdb
TempPE
StrategyPattern.exe
StrategyPattern.pdb
StrategyPattern.vshost.exe
StrategyPattern.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
StrategyPattern.exe
StrategyPattern.pdb
TempPE
TemplateMethodPattern.exe
TemplateMethodPattern.pdb
TemplateMethodPattern.vshost.exe
TemplateMethodPattern.vshost.exe.manifest
Release
DesignTimeResolveAssemblyReferencesInput.cache
TemplateMethodPattern.exe
TemplateMethodPattern.pdb
TempPE
bin
Debug
VistorPattern.exe
VistorPattern.pdb
VistorPattern.vshost.exe
Release
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
VistorPattern.exe
VistorPattern.pdb
BehavioralPatterns_StructuralCodeExamples-noexe.zip
ChainOfResponsibility.vshost.exe.manifest
Command.vshost.exe.manifest
Interpreter.vshost.exe.manifest
IteratorPattren
bin
Debug
Iterator.vshost.exe.manifest
obj
x86
Debug
Properties
Mediator.vshost.exe.manifest
Memento.vshost.exe.manifest
Observer.vshost.exe.manifest
State.vshost.exe.manifest
TemplatePattern
bin
Debug
Template.vshost.exe.manifest
obj
x86
Debug
Properties
VisitorPattern
bin
Debug
Visitor.vshost.exe.manifest
obj
x86
Debug
Properties
BehavioralPatterns_StructuralCodeExamples.zip
ChainOfResponsibility.exe
ChainOfResponsibility.pdb
ChainOfResponsibility.vshost.exe
ChainOfResponsibility.vshost.exe.manifest
ChainOfResponsibility.exe
ChainOfResponsibility.pdb
DesignTimeResolveAssemblyReferencesInput.cache
Command.exe
Command.pdb
Command.vshost.exe
Command.vshost.exe.manifest
Command.exe
Command.pdb
DesignTimeResolveAssemblyReferencesInput.cache
Interpreter.exe
Interpreter.pdb
Interpreter.vshost.exe
Interpreter.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
Interpreter.exe
Interpreter.pdb
Iterator.exe
Iterator.pdb
Iterator.vshost.exe
Iterator.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
Iterator.exe
Iterator.pdb
TempPE
Mediator.exe
Mediator.pdb
Mediator.vshost.exe
Mediator.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
Mediator.exe
Mediator.pdb
Memento.exe
Memento.pdb
Memento.vshost.exe
Memento.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
Memento.exe
Memento.pdb
Observer.exe
Observer.pdb
Observer.vshost.exe
Observer.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
Observer.exe
Observer.pdb
State.exe
State.pdb
State.vshost.exe
State.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
State.exe
State.pdb
Strategy.exe
Strategy.pdb
DesignTimeResolveAssemblyReferencesInput.cache
Strategy.exe
Strategy.pdb
Template.exe
Template.pdb
Template.vshost.exe
Template.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
Template.exe
Template.pdb
TempPE
Visitor.exe
Visitor.pdb
Visitor.vshost.exe
Visitor.vshost.exe.manifest
DesignTimeResolveAssemblyReferencesInput.cache
TempPE
Visitor.exe
Visitor.pdb
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("VistorPattern")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("VistorPattern")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components.  If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("6829e016-3861-433d-a86f-c613faf8e7db")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Kanasz Robert
Architect The Staffing Edge & Marwin Cassovia Soft
Slovakia Slovakia
My name is Robert Kanasz and I have been working with ASP.NET, WinForms and C# for several years.
MCSD - Web Applications
MCSE - Data Platform
MCPD - ASP.NET Developer 3.5
- Web Developer 4
MCITP - Database Administrator 2008
- Database Developer 2008
MCSA - SQL Server 2012
MCTS - .NET Framework 3.5, ASP.NET Applications
- SQL Server 2008, Database Development
- SQL Server 2008, Implementation and Maintenance
- .NET Framework 4, Data Access
- .NET Framework 4, Service Communication Applications
- .NET Framework 4, Web Applications
MS - Programming in HTML5 with JavaScript and CSS3 Specialist
 
Open source projects: DBScripter - Library for scripting SQL Server database objects
 

Please, do not forget vote

| Advertise | Privacy | Mobile
Web01 | 2.8.140821.2 | Last Updated 10 Jan 2013
Article Copyright 2012 by Kanasz Robert
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid