public static void InitualFile(string regFile) { if (!File.Exists(regFile)) { RegistDefaultOperator(regFile); } else { _operatorRegList = SchemaFile.LoadSchema <OperatorRegList>(regFile); } }
public static void RegistDefaultOperator(string regFile) { _operatorRegList = new OperatorRegList(); RegistOperator("||", typeof(Or), 1); RegistOperator("&&", typeof(And), 1); RegistOperator(">", typeof(GreaterThan), 2); RegistOperator("<", typeof(LessThan), 2); RegistOperator("<=", typeof(GE), 2); RegistOperator(">=", typeof(LE), 2); RegistOperator("!=", typeof(NotEqualTo), 2); RegistOperator("==", typeof(EqualTo), 2); RegistOperator("=", typeof(EqualTo), 2); RegistOperator("+", typeof(Addition), 3); RegistOperator("-", typeof(Subtraction), 3); RegistOperator("*", typeof(Multiplication), 4); RegistOperator("/", typeof(Division), 4); SchemaFile.SaveSchema <OperatorRegList>(_operatorRegList, regFile); }