Exemplo n.º 1
0
        static Dictionary <string, ICmd> InitializeCommands()
        {
            Dictionary <string, ICmd> result =
                new Dictionary <string, ICmd>(StringComparer.InvariantCultureIgnoreCase);

            ICmd cmd = new InstallCmd();

            result.Add(cmd.CommandName, cmd);

            cmd = new UninstallCmd();
            result.Add(cmd.CommandName, cmd);

            cmd = new ServerCmd();
            result.Add(cmd.CommandName, cmd);

            cmd = new RepofilterCmd();
            result.Add(cmd.CommandName, cmd);

            cmd = new RepomapCmd();
            result.Add(cmd.CommandName, cmd);

            cmd = new TriggerCmd();
            result.Add(cmd.CommandName, cmd);

            cmd = new RunCmd();
            result.Add(cmd.CommandName, cmd);

            cmd = new WarnEmailCmd();
            result.Add(cmd.CommandName, cmd);

            cmd = new LogCmd();
            result.Add(cmd.CommandName, cmd);

            return(result);
        }
Exemplo n.º 2
0
        public void fetchCmd(string _CmdString)
        {
            string[]  buff = _CmdString.Split(';');
            ServerCmd cmd  = (ServerCmd)Enum.Parse(typeof(ServerCmd), buff[0]);

            Args = buff.Where(w => w != buff[0]).ToList <string>();
        }
Exemplo n.º 3
0
 public Command(ServerCmd server)
 {
     Server = server;
 }
Exemplo n.º 4
0
 public ExpCmd(ServerCmd serverCmd)
 {
     ServerCmd = serverCmd;
 }