This project is read-only.

Getting Started

Getting started with the Command Console Framework is a straight-forward process.

Initial Steps

Follow steps 3-6 for each new console application based on the framework (steps 1 & 2 only need to be preformed once, or when there is an update):
  1. Download the latest DLL from the Downloads page.
  2. Extract the zip file to a known location on your computer.
  3. Use Visual Studio 2010 to create a new Console Application.
  4. Right click the application name in the solution explorer, choose Add Reference, then browse to the extracted DLL.
  5. Once you've added the reference, go to the Module1 code file and on the top line place Imports CommandConsoleFramework
  6. In the Main() method of Module1 enter CommandInterpreter.Run()

Now you are ready to write and register you application's command methods. For a simple example, see the Home page.

Primary Framework Objects

The primary objects that make up the framework are the CommandInterpreter, ConsoleInput, and ConsoleOutput classes. These are singleton classes that expose shared members for working with the framework.

The instance classes you will use most often are the CommandLine class (via command method parameters), and the CommandMethod and CommandMethodArgument attribute classes (to decorate your command methods).

Command Methods

The framework functions by translating the first word entered by a user into a matching method registered to the interpreter. This translation may include a predefined prefix token (such as "\") which denotes a valid command word. In order for a method to serve as a command target, it must have the following signature:

Sub MyCommandMethod(ByVal line As CommandLine)

Any subroutine which takes a single CommandLine parameter can be used as a command method, so long as it has the <CommandMethod()> attribute.

Once a valid command is recognized, the associated method is executed.

For more information, see Command Registration.

Last edited May 18, 2012 at 4:28 AM by ReedKimble, version 6


No comments yet.