Esempio n. 1
0
 /// <summary>
 /// New API: obsoletes Public and Private Command, Commandlet has changed too
 /// </summary>
 /// <param name="cmd"></param>
 /// <returns></returns>
 public bool AddCommand(Commandlet cmd)
 {
     if (cmd.AccessString != null && Acl != null)
     {
         Acl.AddAccessString(cmd.AccessString);
     }
     if (!commands.ContainsKey(cmd.Command))
     {
         commands.Add(cmd.Command, cmd);
         return true;
     }
     return false;
 }
Esempio n. 2
0
 public bool RemoveCommand(Commandlet cmd)
 {
     return RemoveCommand(cmd.Command);
 }