Esempio n. 1
0
 public new void Execute(FigaroContext context, string args)
 {
     try
     {
         if (args.ToLower().Equals("on"))
         {
             context.SetAutoIndexing(true);
         }
         else if (args.ToLower().Equals("off"))
         {
             context.SetAutoIndexing(false);
         }
         else
         {
             throw new ValidationException("command only accepts 'on' or 'off' as a parameter.");
         }
         return;
     }
     catch (ValidationException ve)
     {
         Warn(ve.Message);
         WarnUsage();
         return;
     }
 }