コード例 #1
0
 public virtual Command GetAssistingCommand(Command.PriorityType priority, string text)
 {
     foreach (Command cmd in Commands)
     {
         if ((cmd.Priority & priority) == priority && cmd.IsOwner(text))
         {
             return(cmd);
         }
     }
     return(null);
 }
コード例 #2
0
 private InterpreterPlugin GetAssistingPlugin(string cmd, string parameters, Command.PriorityType priority)
 {
     if (parameters.Trim() == string.Empty)
     {
         return(null);
     }
     else
     {
         foreach (InterpreterPlugin plugin in _plugins)
         {
             Command command = plugin.GetCommandByName(cmd);
             if (command != null && command.FitsPriority(priority) && command.IsOwner(parameters))
             {
                 return(plugin);
             }
         }
         return(null);
     }
 }
コード例 #3
0
 public virtual string GetAssistingCommandName(Command.PriorityType priority, string text)
 {
     return(GetAssistingCommand(priority, text).Name);
 }