コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }