Пример #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);
            }
Пример #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);
Пример #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);
Пример #4
0
 internal CharGroupCharGroup(CharGroup group, bool negative)
 {
     _group   = group ?? throw new ArgumentNullException(nameof(group));
     Negative = negative;
 }
Пример #5
0
 public override CharGroup Negate() => CharGroup.Create(_block, !_negative);
Пример #6
0
 public override CharGroup Negate() => CharGroup.Create(_category, !_negative);
Пример #7
0
 public override CharGroup Negate() => CharGroup.Create(_value, true);