Contains all the top-level Design Pattern Examples. More...
Classes | |
struct | Exercise |
Represents a single exercise or example for a design pattern. More... | |
struct | Options |
Represents the command line options provided to the program, if any. More... | |
Private Member Functions | |
string | GetVersion () |
Helper method to get the version of this assembly. | |
void | Help (Exercise[] exercises) |
Helper method to show usage information for this program. | |
void | ShowVersion () |
Helper method to show just the version of the application. | |
bool | ParseOptions (string[] args, Exercise[] exercises, ref Options options) |
Helper method to parse the given options and store the results in the given Options structure. Displays help if requested and returns false. | |
void | Run (string[] args) |
Run the specified examples. | |
Static Private Member Functions | |
static void | Main (string[] args) |
Main entry point into this example program. | |
Contains all the top-level Design Pattern Examples.
Definition at line 19 of file Program.cs.
|
inlineprivate |
Helper method to get the version of this assembly.
Definition at line 69 of file Program.cs.
Referenced by Program.Help(), and Program.ShowVersion().
|
inlineprivate |
Helper method to show usage information for this program.
exercises | List of Exercise objects for which to show the names. |
Definition at line 84 of file Program.cs.
References exercises, Program.GetVersion(), and Program.Exercise.name.
Referenced by Program.ParseOptions().
|
inlinestaticprivate |
Main entry point into this example program.
args | Command line arguments. |
Definition at line 213 of file Program.cs.
References Program.Run().
Helper method to parse the given options and store the results in the given Options structure. Displays help if requested and returns false.
args | List of arguments passed on the command line. |
exercises | List of Exercise objects to display if help is needed. |
options | An Options structure to be filled in by command line parameters. |
Definition at line 129 of file Program.cs.
References exercises, Program.Help(), and Program.ShowVersion().
Referenced by Program.Run().
|
inlineprivate |
Run the specified examples.
args | Command line arguments. |
Definition at line 166 of file Program.cs.
References Program.Options.exercise_names, Program.Exercise.exercise_to_run, exercises, Program.Exercise.name, Program.ParseOptions(), Adapter_Exercise.Run(), Bridge_Exercise.Run(), Command_Exercise.Run(), Composite_Exercise.Run(), Decorator_Exercise.Run(), Facade_Exercise.Run(), Flyweight_Exercise.Run(), HandlerChain_Exercise.Run(), Interpreter_Exercise.Run(), Iterator_Exercise.Run(), Mediator_Exercise.Run(), Memento_Exercise.Run(), NullObject_Exercise.Run(), Observer_Exercise.Run(), Proxy_Exercise.Run(), State_Exercise.Run(), Strategy_Exercise.Run(), and Visitor_Exercise.Run().
Referenced by Program.Main().
|
inlineprivate |
Helper method to show just the version of the application.
Definition at line 114 of file Program.cs.
References Program.GetVersion().
Referenced by Program.ParseOptions().