Пример #1
0
 /// <summary>
 /// Concatenates the patterns so that this <see cref="Pattern"/> comes before <paramref name="other"/>
 /// </summary>
 /// <param name="other">The succeeding <see cref="Pattern"/></param>
 /// <returns>A new <see cref="Pattern"/> concatenating this <see cref="Pattern"/> and <paramref name="other"/></returns>
 public static Pattern Then(this String @string, Capture other)
 {
     Guard.NotNull(@string, nameof(@string));
     Guard.NotNull(other, nameof(other));
     return(new StringLiteral(@string).Concatenate(new CaptureLiteral(other)));
 }
Пример #2
0
 /// <summary>
 /// Concatenates the patterns so that this <see cref="Rune"/> comes before <paramref name="other"/>
 /// </summary>
 /// <param name="other">The succeeding <see cref="Capture"/></param>
 /// <returns>A new <see cref="Pattern"/> concatenating this <see cref="Rune"/> and <paramref name="other"/></returns>
 public static Pattern Then(this Rune @Rune, Capture other)
 {
     Guard.NotNull(other, nameof(other));
     return(new RuneLiteral(@Rune).Concatenate(new CaptureLiteral(other)));
 }