Пример #1
0
 public static bool TryLoad(string line)
 {
     if (!(line.Substring(0, 4) == "read"))
     {
         return(false);
     }
     ReadFileInstruction.Load(line);
     return(true);
 }
Пример #2
0
        public static IInstruction Load(string line)
        {
            ReadFileInstruction readFileInstruction = new ReadFileInstruction("", "", false);
            List <string>       list = new List <string>();

            Program.ToWords(line, 'ﻃ', (ICollection <string>)list);
            readFileInstruction.path          = Program.PathChange(list[1].Replace("\\n", "\n"));
            readFileInstruction.variable_name = list[2].Replace("\\n", "\n");
            readFileInstruction.variable      = bool.Parse(list[3]);
            return((IInstruction)readFileInstruction);
        }