2 using System.Collections;
4 namespace TechBot.Library
6 public class HelpCommand : BaseCommand, ICommand
8 private IServiceOutput serviceOutput;
9 private ArrayList commands;
11 public HelpCommand(IServiceOutput serviceOutput,
14 this.serviceOutput = serviceOutput;
15 this.commands = commands;
18 public bool CanHandle(string commandName)
20 return CanHandle(commandName,
21 new string[] { "help" });
24 public void Handle(MessageContext context,
28 serviceOutput.WriteLine(context,
29 "I support the following commands:");
30 foreach (ICommand command in commands)
32 serviceOutput.WriteLine(context,