Exemplo n.º 1
0
Arquivo: Command.cs Projeto: rh/mix
        protected bool Equals(Command command)
        {
            if (command == null)
            {
                return false;
            }

            return GetType().Equals(command.GetType());
        }
Exemplo n.º 2
0
 private static string OutputFor(Command command)
 {
     using (TextWriter writer = new StringWriter())
     {
         var context = new Context(command.Context) {Output = writer};
         command.Context = context;
         command.Execute();
         return writer.ToString();
     }
 }