public interface CommandHandler
{
public string CommandType { get; }
public string CommandName { get; }
// or a true/false delegate to decide if handler should handle a command
// or a set of attributes that should match for the handler to get the command
public void HandleCommand(sml.Identifier command);
}
public class ExpireCommandHandler
{
public string CommandType { get { return "strategy" } }
public string CommandName { get { return "expire-task" } }
public void HandleCommand(sml.Identifier command)
{
// blah blah blah
}
}
'''