main
 1using System;
 2
 3namespace jive
 4{
 5  static public class CommandExtensions
 6  {
 7    static public jive.Command then<Command>(this jive.Command left) where Command : jive.Command, new()
 8    {
 9      return then(left, new Command());
10    }
11
12    static public Command then(this Command left, Command right)
13    {
14      return new ChainedCommand(left, right);
15    }
16
17    static public Command then(this Command left, Action right)
18    {
19      return new ChainedCommand(left, new AnonymousCommand(right));
20    }
21  }
22}