protected bool Equals(Command command) { if (command == null) { return false; } return GetType().Equals(command.GetType()); }
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(); } }