main
 1using System;
 2
 3namespace gorilla.commons.utility
 4{
 5    static public class CommandExtensions
 6    {
 7        static public utility.Command then<Command>(this utility.Command left) where Command : utility.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        static public Command<T> then<T>(this Command<T> left, Command<T> right)
23        {
24            return new ChainedCommand<T>(left, right);
25        }
26    }
27}