Esempio n. 1
0
            public override CharGroup Negate()
            {
                switch (_value)
                {
                case CharClass.Digit:
                    return(CharGroup.Create(CharClass.NotDigit));

                case CharClass.WordChar:
                    return(CharGroup.Create(CharClass.NotWordChar));

                case CharClass.WhiteSpace:
                    return(CharGroup.Create(CharClass.NotWhiteSpace));

                case CharClass.NotDigit:
                    return(CharGroup.Create(CharClass.Digit));

                case CharClass.NotWordChar:
                    return(CharGroup.Create(CharClass.WordChar));

                case CharClass.NotWhiteSpace:
                    return(CharGroup.Create(CharClass.WhiteSpace));
                }

                return(null);
            }
Esempio n. 2
0
 /// <summary>
 /// Converts the current instance of the <see cref="CharGrouping"/> to the negative character group.
 /// </summary>
 /// <returns></returns>
 public CharGroup ToNegativeGroup() => CharGroup.Create(this, true);
Esempio n. 3
0
 /// <summary>
 /// Converts the current instance of the <see cref="CharGrouping"/> to the positive character group.
 /// </summary>
 /// <returns></returns>
 public CharGroup ToGroup() => CharGroup.Create(this, false);
Esempio n. 4
0
 internal CharGroupCharGroup(CharGroup group, bool negative)
 {
     _group   = group ?? throw new ArgumentNullException(nameof(group));
     Negative = negative;
 }
Esempio n. 5
0
 public override CharGroup Negate() => CharGroup.Create(_block, !_negative);
Esempio n. 6
0
 public override CharGroup Negate() => CharGroup.Create(_category, !_negative);
Esempio n. 7
0
 public override CharGroup Negate() => CharGroup.Create(_value, true);