Send Feedback
A Developer website designed for Developers
Real Media Fusion Logo
  • Skip to content
  • Skip to main navigation
  • Skip to left section navigation
  • Skip to right section navigation
  • Home
  • Design Patterns
  • Code Frameworks
  • Open Source
  • Microsoft.NET
  • Web Design
  • Printer Friendly Version
  • Add to Favourites
You are here:  Home - Design Patterns - Behavioural Patterns - Visitor Pattern - Code Review

Visitor Pattern Code Review

Define the Context Object

Code Review

  • Visitor Pattern Code Review: Define the Pattern Interface and Handler Objects
  • Visitor Pattern Code Review: Define the Element Interface and Handler Objects
  • Visitor Pattern Code Review: Define the Context Object
  • Visitor Pattern Code Review: Use the Visitor Pattern

Code Walkthrough

The Context class (object) is a simple class that stores that input data to be used by the Element base class (object).

class Context { public String Input { get; set; }
public Context(String c) { this.Input = c; } }

More Information

  • Design Pattern References

Code Review

  • Visitor Pattern Code Review

Design Patterns

  • Chain Of Responsibility Pattern
  • Command Pattern
  • Interpreter Pattern
  • Iterator Pattern
  • Mediator Pattern
  • Memento Pattern
  • Observer Pattern
  • State Pattern
  • Strategy Pattern
  • Template Method Pattern
  • Visitor Pattern

Share Content

  • DotNet Kicks
  • Digg
  • del.icio.us
  • Live Favourites
  • ma.gnolia
  • reddit
  • Slashdot
  • Technorati
  • Yahoo!
  • Design patterns
  • Code frameworks
  • Open source
  • Microsoft.NET
  • Web design
  • Cookie policy
  • Accessibility statement
  • Site map