public static bool TryLoad(string line) { if (!(line.Substring(0, 4) == "read")) { return(false); } ReadFileInstruction.Load(line); return(true); }
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); }