Some sample C# code that implements a version of the command pattern