mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 03:48:17 +00:00
70350430a5
svn path=/trunk/; revision=13604
30 lines
584 B
C#
30 lines
584 B
C#
using System;
|
|
|
|
namespace TechBot.Library
|
|
{
|
|
public interface ICommand
|
|
{
|
|
bool CanHandle(string commandName);
|
|
void Handle(MessageContext context,
|
|
string commandName,
|
|
string parameters);
|
|
string Help();
|
|
}
|
|
|
|
|
|
|
|
public class BaseCommand
|
|
{
|
|
protected bool CanHandle(string commandName,
|
|
string[] availableCommands)
|
|
{
|
|
foreach (string availableCommand in availableCommands)
|
|
{
|
|
if (String.Compare(availableCommand, commandName, true) == 0)
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|