Exemple #1
0
 public void RegisterPlugin(IJarvisPlugin plugin)
 {
     if (plugin.OnEnable(this))
     {
         foreach (IJarvisCommand command in plugin.GetCommands())
         {
             Grammar gram = command.BuildGrammar();
             if (gram != null)
             {
                 gram.Name = command.GetType().Namespace + "." + command.GetType().Name;
                 this.rec.LoadGrammar(gram);
                 commands.Add(gram.Name, command);
             }
         }
     }
 }
Exemple #2
0
 public void RegisterPlugin(IJarvisPlugin plugin)
 {
     if (plugin.OnEnable(this))
     {
         foreach (IJarvisCommand command in plugin.GetCommands())
         {
             Grammar gram = command.BuildGrammar();
             if (gram != null)
             {
                 gram.Name = command.GetType().Namespace + "." + command.GetType().Name;
                 this.rec.LoadGrammar(gram);
                 commands.Add(gram.Name, command);
             }
         }
     }
 }