Pihrtsoft.Text.RegularExpressions.Linq.PatternBuilder.AppendSubtraction C# (CSharp) Метод

AppendSubtraction() публичный Метод

Appends a pattern that matches a character from a specified base group except characters from a specified excluded group.
or is null.
public AppendSubtraction ( IBaseGroup baseGroup, IExcludedGroup excludedGroup ) : void
baseGroup IBaseGroup A base group.
excludedGroup IExcludedGroup An excluded group.
Результат void
        public void AppendSubtraction(IBaseGroup baseGroup, IExcludedGroup excludedGroup)
        {
            if (baseGroup == null)
                throw new ArgumentNullException(nameof(baseGroup));

            if (excludedGroup == null)
                throw new ArgumentNullException(nameof(excludedGroup));

            AppendCharGroupStart();

            baseGroup.AppendBaseGroupTo(this);

            AppendDirect('-');

            excludedGroup.AppendExcludedGroupTo(this);

            AppendCharGroupEnd();
        }

Usage Example

Пример #1
0
 internal override void AppendTo(PatternBuilder builder)
 {
     builder.AppendSubtraction(_baseGroup, _excludedGroup);
 }