コード例 #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);
        }
コード例 #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>();
        }
コード例 #3
0
ファイル: Command.cs プロジェクト: pepealonso95/ProgRedes
 public Command(ServerCmd server)
 {
     Server = server;
 }
コード例 #4
0
 public ExpCmd(ServerCmd serverCmd)
 {
     ServerCmd = serverCmd;
 }