Interpreter Pattern Code Review
Define the Pattern Context Object
Code Review
- Interpreter Pattern Code Review: Define the Element Base Class and Associated Child Clases
- Interpreter Pattern Code Review: Define the Pattern Context Object
- Interpreter Pattern Code Review: Use the Interpreter Pattern
Code Walkthrough
The Context class (object) is simple class that stores that input data to, and output data from the Element class (object).
class Context
{
public String Input { get; set; }
public Double Output { get; set; }
public Context(String c) { this.Input = c; this.Output = 0; } }
public Context(String c) { this.Input = c; this.Output = 0; } }
Printer Friendly Version
Add to Favourites
DotNet Kicks
Digg
del.icio.us
Live Favourites
ma.gnolia
reddit
Slashdot
Technorati
Yahoo!