public Rule(RuleType ruleType, bool optionalFlag, string[] values) { if (values == null || values.Length < 1) { throw new System.ArgumentNullException(); } Type = ruleType; Optional = optionalFlag; Values.AddRange(values); MatchType = RuleMatchType.ByValue; Reset(); }
public Rule(RuleType ruleType, bool optionalFlag, Lexer.LexmeType[] types) { if (types == null || types.Length < 1) { throw new ArgumentNullException(); } Type = ruleType; Optional = optionalFlag; Types.AddRange(types); MatchType = RuleMatchType.ByType; Reset(); }
public Rule(RuleType ruleType, bool optionalFlag, string value) { if (value == null) { throw new ArgumentNullException(); } Type = ruleType; Optional = optionalFlag; Values.Add(value); MatchType = RuleMatchType.ByValue; Reset(); }