Exemplo n.º 1
0
 private string[] parse(string command, ref CMDCODE code)
 {
     for (int i = 0; i < scmds.Count; i++)
     {
         SupportedCommand curr = scmds.ElementAt(i);
         string[]         ret  = curr.check_if_match(command, ref code);
         if (ret != null)
         {
             return(ret);
         }
     }
     return(null);
 }
Exemplo n.º 2
0
        public IFSDCommandParser()
        {
            FileStream   fs = new FileStream("supported_cmds.txt", FileMode.Open);
            StreamReader sr = new StreamReader(fs);

            string line = null;

            while ((line = sr.ReadLine()) != null)
            {
                SupportedCommand cmd = new SupportedCommand(line);
                scmds.Add(cmd);
            }
        }