< Summary

Information
Class: System.Text.RegularExpressions.Generated.<RegexGenerator_g>FBCF590B5F84406741827BBEBFC1D46AC7F3FBEEB0A13BF5ECEC9554F9E75F6B9__Email_0
Assembly: ArturRios.Util
File(s): D:\Repositories\dotnet-util\src\obj\Debug\net10.0\generated\System.Text.RegularExpressions.Generator\System.Text.RegularExpressions.Generator.RegexGenerator\RegexGenerator.g.cs
Line coverage
81%
Covered lines: 204
Uncovered lines: 46
Coverable lines: 250
Total lines: 1226
Line coverage: 81.6%
Branch coverage
73%
Covered branches: 73
Total branches: 100
Branch coverage: 73%
Method coverage
100%
Covered methods: 7
Fully covered methods: 4
Total methods: 7
Method coverage: 100%
Full method coverage: 57.1%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%11100%
.ctor()100%11100%
CreateInstance()100%11100%
Scan(...)100%44100%
TryFindNextPossibleStartingPosition(...)75%4490.9%
TryMatchAtCurrentPosition(...)71.11%1639079.16%
UncaptureUntil()100%22100%

File(s)

D:\Repositories\dotnet-util\src\obj\Debug\net10.0\generated\System.Text.RegularExpressions.Generator\System.Text.RegularExpressions.Generator.RegexGenerator\RegexGenerator.g.cs

#LineLine coverage
 1// <auto-generated/>
 2#nullable enable
 3#pragma warning disable
 4
 5namespace ArturRios.Util.RegularExpressions
 6{
 7    partial class RegexCollection
 8    {
 9        /// <remarks>
 10        /// Pattern:<br/>
 11        /// <code>^[\\w!#$%&amp;'*+\\-/=?\\^_`{|}~]+(\\.[\\w!#$%&amp;'*+\\-/=?\\^_`{|}~]+)*@((([\\-\\w]+\\.)+[a-zA-Z]{2,
 12        /// Explanation:<br/>
 13        /// <code>
 14        /// ○ Match if at the beginning of the string.<br/>
 15        /// ○ Match a character in the set [!#-'*+\-/=?^-`{-~\w] greedily at least once.<br/>
 16        /// ○ Loop greedily any number of times.<br/>
 17        ///     ○ 1st capture group.<br/>
 18        ///         ○ Match '.'.<br/>
 19        ///         ○ Match a character in the set [!#-'*+\-/=?^-`{-~\w] atomically at least once.<br/>
 20        /// ○ Match '@'.<br/>
 21        /// ○ 2nd capture group.<br/>
 22        ///     ○ Match with 2 alternative expressions.<br/>
 23        ///         ○ 3rd capture group.<br/>
 24        ///             ○ Loop greedily at least once.<br/>
 25        ///                 ○ 4th capture group.<br/>
 26        ///                     ○ Match a character in the set [\-\w] atomically at least once.<br/>
 27        ///                     ○ Match '.'.<br/>
 28        ///             ○ Match an ASCII letter atomically at least 2 and at most 4 times.<br/>
 29        ///         ○ 5th capture group.<br/>
 30        ///             ○ Loop exactly 3 times.<br/>
 31        ///                 ○ 6th capture group.<br/>
 32        ///                     ○ Match a character in the set [0-9] atomically at least 1 and at most 3 times.<br/>
 33        ///                     ○ Match '.'.<br/>
 34        ///             ○ Match a character in the set [0-9] atomically at least 1 and at most 3 times.<br/>
 35        /// ○ Match if at the end of the string or if before an ending newline.<br/>
 36        /// </code>
 37        /// </remarks>
 38        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.700
 39        public static partial global::System.Text.RegularExpressions.Regex Email() => global::System.Text.RegularExpress
 40    }
 41}
 42
 43namespace ArturRios.Util.RegularExpressions
 44{
 45    partial class RegexCollection
 46    {
 47        /// <remarks>
 48        /// Pattern:<br/>
 49        /// <code>[0-9]+</code><br/>
 50        /// Explanation:<br/>
 51        /// <code>
 52        /// ○ Match a character in the set [0-9] atomically at least once.<br/>
 53        /// </code>
 54        /// </remarks>
 55        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.700
 56        public static partial global::System.Text.RegularExpressions.Regex HasNumber() => global::System.Text.RegularExp
 57    }
 58}
 59
 60namespace ArturRios.Util.RegularExpressions
 61{
 62    partial class RegexCollection
 63    {
 64        /// <remarks>
 65        /// Pattern:<br/>
 66        /// <code>[a-z]+</code><br/>
 67        /// Explanation:<br/>
 68        /// <code>
 69        /// ○ Match a character in the set [a-z] atomically at least once.<br/>
 70        /// </code>
 71        /// </remarks>
 72        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.700
 73        public static partial global::System.Text.RegularExpressions.Regex HasLowerChar() => global::System.Text.Regular
 74    }
 75}
 76
 77namespace ArturRios.Util.RegularExpressions
 78{
 79    partial class RegexCollection
 80    {
 81        /// <remarks>
 82        /// Pattern:<br/>
 83        /// <code>[A-Z]+</code><br/>
 84        /// Explanation:<br/>
 85        /// <code>
 86        /// ○ Match a character in the set [A-Z] atomically at least once.<br/>
 87        /// </code>
 88        /// </remarks>
 89        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.700
 90        public static partial global::System.Text.RegularExpressions.Regex HasUpperChar() => global::System.Text.Regular
 91    }
 92}
 93
 94namespace ArturRios.Util.RegularExpressions
 95{
 96    partial class RegexCollection
 97    {
 98        /// <remarks>
 99        /// Pattern:<br/>
 100        /// <code>^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$</code><br/>
 101        /// Explanation:<br/>
 102        /// <code>
 103        /// ○ Match if at the beginning of the string.<br/>
 104        /// ○ Zero-width positive lookahead.<br/>
 105        ///     ○ Match a character other than '\n' greedily any number of times.<br/>
 106        ///     ○ Match a character in the set [a-z].<br/>
 107        /// ○ Zero-width positive lookahead.<br/>
 108        ///     ○ Match a character other than '\n' greedily any number of times.<br/>
 109        ///     ○ Match a character in the set [A-Z].<br/>
 110        /// ○ Zero-width positive lookahead.<br/>
 111        ///     ○ Match a character other than '\n' greedily any number of times.<br/>
 112        ///     ○ Match a Unicode digit.<br/>
 113        /// ○ Match a character other than '\n' greedily at least once.<br/>
 114        /// ○ Match if at the end of the string or if before an ending newline.<br/>
 115        /// </code>
 116        /// </remarks>
 117        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.700
 118        public static partial global::System.Text.RegularExpressions.Regex HasNumberLowerAndUpperChar() => global::Syste
 119    }
 120}
 121
 122namespace System.Text.RegularExpressions.Generated
 123{
 124    using System;
 125    using System.Buffers;
 126    using System.CodeDom.Compiler;
 127    using System.Collections;
 128    using System.ComponentModel;
 129    using System.Globalization;
 130    using System.Runtime.CompilerServices;
 131    using System.Text.RegularExpressions;
 132    using System.Threading;
 133
 134    /// <summary>Custom <see cref="Regex"/>-derived type for the Email method.</summary>
 135    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
 136    file sealed class Email_0 : Regex
 137    {
 138        /// <summary>Cached, thread-safe singleton instance.</summary>
 1139        internal static readonly Email_0 Instance = new();
 140
 141        /// <summary>Initializes the instance.</summary>
 1142        private Email_0()
 1143        {
 1144            base.pattern = "^[\\w!#$%&'*+\\-/=?\\^_`{|}~]+(\\.[\\w!#$%&'*+\\-/=?\\^_`{|}~]+)*@((([\\-\\w]+\\.)+[a-zA-Z]{
 1145            base.roptions = RegexOptions.None;
 1146            ValidateMatchTimeout(Utilities.s_defaultTimeout);
 1147            base.internalMatchTimeout = Utilities.s_defaultTimeout;
 1148            base.factory = new RunnerFactory();
 1149            base.capsize = 7;
 1150        }
 151
 152        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 153        private sealed class RunnerFactory : RegexRunnerFactory
 154        {
 155            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 1156            protected override RegexRunner CreateInstance() => new Runner();
 157
 158            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 159            private sealed class Runner : RegexRunner
 160            {
 161                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 162                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 163                protected override void Scan(ReadOnlySpan<char> inputSpan)
 34164                {
 165                    // The pattern is anchored.  Validate the current position and try to match at it only.
 34166                    if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
 15167                    {
 15168                        base.runtextpos = inputSpan.Length;
 15169                    }
 34170                }
 171
 172                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 173                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 174                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 175                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 34176                {
 34177                    int pos = base.runtextpos;
 178
 179                    // Any possible match is at least 6 characters.
 34180                    if (pos <= inputSpan.Length - 6)
 32181                    {
 182                        // The pattern leads with a beginning (\A) anchor.
 32183                        if (pos == 0)
 32184                        {
 32185                            return true;
 186                        }
 0187                    }
 188
 189                    // No match found.
 2190                    base.runtextpos = inputSpan.Length;
 2191                    return false;
 34192                }
 193
 194                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 195                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 196                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 197                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 32198                {
 32199                    int pos = base.runtextpos;
 32200                    int matchStart = pos;
 201                    char ch;
 32202                    int alternation_branch = 0;
 32203                    int alternation_starting_capturepos = 0;
 32204                    int alternation_starting_pos = 0;
 32205                    int capture_starting_pos1 = 0;
 32206                    int capture_starting_pos2 = 0;
 32207                    int capture_starting_pos4 = 0;
 32208                    int charloop_capture_pos = 0;
 64209                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
 32210                    int loop_iteration = 0;
 32211                    int loop_iteration1 = 0;
 32212                    int stackpos = 0;
 32213                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 214
 215                    // Match if at the beginning of the string.
 32216                    if (pos != 0)
 0217                    {
 0218                        UncaptureUntil(0);
 0219                        return false; // The input didn't match.
 220                    }
 221
 222                    // Match a character in the set [!#-'*+\-/=?^-`{-~\w] greedily at least once.
 223                    //{
 32224                        charloop_starting_pos = pos;
 225
 32226                        int iteration = 0;
 117227                        while ((uint)iteration < (uint)slice.Length && ((ch = slice[iteration]) < 128 ? ("\0\0곺ꏿ\ufffe쟿\
 85228                        {
 85229                            iteration++;
 85230                        }
 231
 32232                        if (iteration == 0)
 1233                        {
 1234                            UncaptureUntil(0);
 1235                            return false; // The input didn't match.
 236                        }
 237
 31238                        slice = slice.Slice(iteration);
 31239                        pos += iteration;
 240
 31241                        charloop_ending_pos = pos;
 31242                        charloop_starting_pos++;
 31243                        goto CharLoopEnd;
 244
 34245                        CharLoopBacktrack:
 34246                        UncaptureUntil(charloop_capture_pos);
 247
 34248                        if (Utilities.s_hasTimeout)
 0249                        {
 0250                            base.CheckTimeout();
 0251                        }
 252
 34253                        if (charloop_starting_pos >= charloop_ending_pos)
 14254                        {
 14255                            UncaptureUntil(0);
 14256                            return false; // The input didn't match.
 257                        }
 20258                        pos = --charloop_ending_pos;
 20259                        slice = inputSpan.Slice(pos);
 260
 51261                        CharLoopEnd:
 51262                        charloop_capture_pos = base.Crawlpos();
 263                    //}
 264
 265                    // Loop greedily any number of times.
 266                    //{
 51267                        loop_iteration = 0;
 268
 62269                        LoopBody:
 62270                        Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
 271
 62272                        loop_iteration++;
 273
 274                        // 1st capture group.
 62275                        {
 62276                            int capture_starting_pos = pos;
 277
 278                            // Match '.'.
 62279                            if (slice.IsEmpty || slice[0] != '.')
 51280                            {
 51281                                goto LoopIterationNoMatch;
 282                            }
 283
 284                            // Match a character in the set [!#-'*+\-/=?^-`{-~\w] atomically at least once.
 11285                            {
 11286                                pos++;
 11287                                slice = inputSpan.Slice(pos);
 11288                                int iteration1 = 0;
 45289                                while ((uint)iteration1 < (uint)slice.Length && ((ch = slice[iteration1]) < 128 ? ("\0\0
 34290                                {
 34291                                    iteration1++;
 34292                                }
 293
 11294                                if (iteration1 == 0)
 0295                                {
 0296                                    goto LoopIterationNoMatch;
 297                                }
 298
 11299                                slice = slice.Slice(iteration1);
 11300                                pos += iteration1;
 11301                            }
 302
 11303                            base.Capture(1, capture_starting_pos, pos);
 11304                        }
 305
 306
 307                        // The loop has no upper bound. Continue iterating greedily.
 11308                        goto LoopBody;
 309
 310                        // The loop iteration failed. Put state back to the way it was before the iteration.
 87311                        LoopIterationNoMatch:
 87312                        if (--loop_iteration < 0)
 34313                        {
 314                            // Unable to match the remainder of the expression after exhausting the loop.
 34315                            goto CharLoopBacktrack;
 316                        }
 53317                        pos = base.runstack![--stackpos];
 53318                        UncaptureUntil(base.runstack![--stackpos]);
 53319                        slice = inputSpan.Slice(pos);
 106320                        LoopEnd:;
 321                    //}
 322
 323                    // Match '@'.
 53324                    if (slice.IsEmpty || slice[0] != '@')
 24325                    {
 24326                        goto LoopIterationNoMatch;
 327                    }
 328
 329                    // 2nd capture group.
 330                    //{
 29331                        pos++;
 29332                        slice = inputSpan.Slice(pos);
 29333                        capture_starting_pos1 = pos;
 334
 335                        // Match with 2 alternative expressions.
 336                        //{
 29337                            alternation_starting_pos = pos;
 29338                            alternation_starting_capturepos = base.Crawlpos();
 339
 340                            // Branch 0
 341                            //{
 342                                // 3rd capture group.
 343                                //{
 29344                                    capture_starting_pos2 = pos;
 345
 346                                    // Loop greedily at least once.
 347                                    //{
 29348                                        loop_iteration1 = 0;
 349
 61350                                        LoopBody1:
 61351                                        Utilities.StackPush(ref base.runstack!, ref stackpos, base.Crawlpos(), pos);
 352
 61353                                        loop_iteration1++;
 354
 355                                        // 4th capture group.
 61356                                        {
 61357                                            int capture_starting_pos3 = pos;
 358
 359                                            // Match a character in the set [\-\w] atomically at least once.
 61360                                            {
 61361                                                int iteration2 = 0;
 355362                                                while ((uint)iteration2 < (uint)slice.Length && ((ch = slice[iteration2]
 294363                                                {
 294364                                                    iteration2++;
 294365                                                }
 366
 61367                                                if (iteration2 == 0)
 5368                                                {
 5369                                                    goto LoopIterationNoMatch1;
 370                                                }
 371
 56372                                                slice = slice.Slice(iteration2);
 56373                                                pos += iteration2;
 56374                                            }
 375
 376                                            // Match '.'.
 56377                                            if (slice.IsEmpty || slice[0] != '.')
 24378                                            {
 24379                                                goto LoopIterationNoMatch1;
 380                                            }
 381
 32382                                            pos++;
 32383                                            slice = inputSpan.Slice(pos);
 32384                                            base.Capture(4, capture_starting_pos3, pos);
 32385                                        }
 386
 387
 388                                        // The loop has no upper bound. Continue iterating greedily.
 32389                                        goto LoopBody1;
 390
 391                                        // The loop iteration failed. Put state back to the way it was before the iterat
 38392                                        LoopIterationNoMatch1:
 38393                                        if (--loop_iteration1 < 0)
 0394                                        {
 395                                            // Unable to match the remainder of the expression after exhausting the loop
 0396                                            goto AlternationBranch;
 397                                        }
 38398                                        pos = base.runstack![--stackpos];
 38399                                        UncaptureUntil(base.runstack![--stackpos]);
 38400                                        slice = inputSpan.Slice(pos);
 38401                                        if (loop_iteration1 == 0)
 12402                                        {
 403                                            // All possible iterations have matched, but it's below the required minimum
 12404                                            goto AlternationBranch;
 405                                        }
 406
 52407                                        LoopEnd1:;
 408                                    //}
 409
 410                                    // Match an ASCII letter atomically at least 2 and at most 4 times.
 26411                                    {
 26412                                        int iteration3 = 0;
 91413                                        while (iteration3 < 4 && (uint)iteration3 < (uint)slice.Length && char.IsAsciiLe
 65414                                        {
 65415                                            iteration3++;
 65416                                        }
 417
 26418                                        if (iteration3 < 2)
 5419                                        {
 5420                                            goto LoopIterationNoMatch1;
 421                                        }
 422
 21423                                        slice = slice.Slice(iteration3);
 21424                                        pos += iteration3;
 21425                                    }
 426
 21427                                    base.Capture(3, capture_starting_pos2, pos);
 428
 21429                                    goto CaptureSkipBacktrack;
 430
 4431                                    CaptureBacktrack:
 4432                                    goto LoopIterationNoMatch1;
 433
 42434                                    CaptureSkipBacktrack:;
 435                                //}
 436
 21437                                alternation_branch = 0;
 21438                                goto AlternationMatch;
 439
 12440                                AlternationBranch:
 12441                                pos = alternation_starting_pos;
 12442                                slice = inputSpan.Slice(pos);
 12443                                UncaptureUntil(alternation_starting_capturepos);
 444                            //}
 445
 446                            // Branch 1
 447                            //{
 448                                // 5th capture group.
 12449                                {
 12450                                    capture_starting_pos4 = pos;
 451
 452                                    // Loop exactly 3 times.
 12453                                    {
 24454                                        for (int loop_iteration2 = 0; loop_iteration2 < 3; loop_iteration2++)
 12455                                        {
 456                                            // 6th capture group.
 12457                                            {
 12458                                                int capture_starting_pos5 = pos;
 459
 460                                                // Match a character in the set [0-9] atomically at least 1 and at most 
 12461                                                {
 12462                                                    int iteration4 = 0;
 12463                                                    while (iteration4 < 3 && (uint)iteration4 < (uint)slice.Length && ch
 0464                                                    {
 0465                                                        iteration4++;
 0466                                                    }
 467
 12468                                                    if (iteration4 == 0)
 12469                                                    {
 12470                                                        goto LoopIterationNoMatch;
 471                                                    }
 472
 0473                                                    slice = slice.Slice(iteration4);
 0474                                                    pos += iteration4;
 0475                                                }
 476
 477                                                // Match '.'.
 0478                                                if (slice.IsEmpty || slice[0] != '.')
 0479                                                {
 0480                                                    goto LoopIterationNoMatch;
 481                                                }
 482
 0483                                                pos++;
 0484                                                slice = inputSpan.Slice(pos);
 0485                                                base.Capture(6, capture_starting_pos5, pos);
 0486                                            }
 0487                                        }
 0488                                    }
 489
 490                                    // Match a character in the set [0-9] atomically at least 1 and at most 3 times.
 0491                                    {
 0492                                        int iteration5 = 0;
 0493                                        while (iteration5 < 3 && (uint)iteration5 < (uint)slice.Length && char.IsAsciiDi
 0494                                        {
 0495                                            iteration5++;
 0496                                        }
 497
 0498                                        if (iteration5 == 0)
 0499                                        {
 0500                                            goto LoopIterationNoMatch;
 501                                        }
 502
 0503                                        slice = slice.Slice(iteration5);
 0504                                        pos += iteration5;
 0505                                    }
 506
 0507                                    base.Capture(5, capture_starting_pos4, pos);
 0508                                }
 509
 0510                                alternation_branch = 1;
 0511                                goto AlternationMatch;
 512                            //}
 513
 4514                            AlternationBacktrack:
 4515                            if (Utilities.s_hasTimeout)
 0516                            {
 0517                                base.CheckTimeout();
 0518                            }
 519
 4520                            switch (alternation_branch)
 521                            {
 522                                case 0:
 4523                                    goto CaptureBacktrack;
 524                                case 1:
 0525                                    goto LoopIterationNoMatch;
 526                            }
 527
 42528                            AlternationMatch:;
 529                        //}
 530
 21531                        base.Capture(2, capture_starting_pos1, pos);
 532
 21533                        goto CaptureSkipBacktrack1;
 534
 4535                        CaptureBacktrack1:
 4536                        goto AlternationBacktrack;
 537
 42538                        CaptureSkipBacktrack1:;
 539                    //}
 540
 541                    // Match if at the end of the string or if before an ending newline.
 21542                    if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
 4543                    {
 4544                        goto CaptureBacktrack1;
 545                    }
 546
 547                    // The input matched.
 17548                    base.runtextpos = pos;
 17549                    base.Capture(0, matchStart, pos);
 17550                    return true;
 551
 552                    // <summary>Undo captures until it reaches the specified capture position.</summary>
 553                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
 554                    void UncaptureUntil(int capturePosition)
 152555                    {
 171556                        while (base.Crawlpos() > capturePosition)
 19557                        {
 19558                            base.Uncapture();
 19559                        }
 152560                    }
 32561                }
 562            }
 563        }
 564
 565    }
 566
 567    /// <summary>Custom <see cref="Regex"/>-derived type for the HasNumber method.</summary>
 568    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
 569    file sealed class HasNumber_1 : Regex
 570    {
 571        /// <summary>Cached, thread-safe singleton instance.</summary>
 572        internal static readonly HasNumber_1 Instance = new();
 573
 574        /// <summary>Initializes the instance.</summary>
 575        private HasNumber_1()
 576        {
 577            base.pattern = "[0-9]+";
 578            base.roptions = RegexOptions.None;
 579            ValidateMatchTimeout(Utilities.s_defaultTimeout);
 580            base.internalMatchTimeout = Utilities.s_defaultTimeout;
 581            base.factory = new RunnerFactory();
 582            base.capsize = 1;
 583        }
 584
 585        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 586        private sealed class RunnerFactory : RegexRunnerFactory
 587        {
 588            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 589            protected override RegexRunner CreateInstance() => new Runner();
 590
 591            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 592            private sealed class Runner : RegexRunner
 593            {
 594                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 595                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 596                protected override void Scan(ReadOnlySpan<char> inputSpan)
 597                {
 598                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the
 599                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
 600                           !TryMatchAtCurrentPosition(inputSpan) &&
 601                           base.runtextpos != inputSpan.Length)
 602                    {
 603                        base.runtextpos++;
 604                        if (Utilities.s_hasTimeout)
 605                        {
 606                            base.CheckTimeout();
 607                        }
 608                    }
 609                }
 610
 611                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 612                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 613                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 614                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 615                {
 616                    int pos = base.runtextpos;
 617
 618                    // Empty matches aren't possible.
 619                    if ((uint)pos < (uint)inputSpan.Length)
 620                    {
 621                        // The pattern begins with a character in the set [0-9].
 622                        // Find the next occurrence. If it can't be found, there's no match.
 623                        int i = inputSpan.Slice(pos).IndexOfAnyInRange('0', '9');
 624                        if (i >= 0)
 625                        {
 626                            base.runtextpos = pos + i;
 627                            return true;
 628                        }
 629                    }
 630
 631                    // No match found.
 632                    base.runtextpos = inputSpan.Length;
 633                    return false;
 634                }
 635
 636                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 637                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 638                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 639                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 640                {
 641                    int pos = base.runtextpos;
 642                    int matchStart = pos;
 643                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 644
 645                    // Match a character in the set [0-9] atomically at least once.
 646                    {
 647                        int iteration = slice.IndexOfAnyExceptInRange('0', '9');
 648                        if (iteration < 0)
 649                        {
 650                            iteration = slice.Length;
 651                        }
 652
 653                        if (iteration == 0)
 654                        {
 655                            return false; // The input didn't match.
 656                        }
 657
 658                        slice = slice.Slice(iteration);
 659                        pos += iteration;
 660                    }
 661
 662                    // The input matched.
 663                    base.runtextpos = pos;
 664                    base.Capture(0, matchStart, pos);
 665                    return true;
 666                }
 667            }
 668        }
 669
 670    }
 671
 672    /// <summary>Custom <see cref="Regex"/>-derived type for the HasLowerChar method.</summary>
 673    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
 674    file sealed class HasLowerChar_2 : Regex
 675    {
 676        /// <summary>Cached, thread-safe singleton instance.</summary>
 677        internal static readonly HasLowerChar_2 Instance = new();
 678
 679        /// <summary>Initializes the instance.</summary>
 680        private HasLowerChar_2()
 681        {
 682            base.pattern = "[a-z]+";
 683            base.roptions = RegexOptions.None;
 684            ValidateMatchTimeout(Utilities.s_defaultTimeout);
 685            base.internalMatchTimeout = Utilities.s_defaultTimeout;
 686            base.factory = new RunnerFactory();
 687            base.capsize = 1;
 688        }
 689
 690        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 691        private sealed class RunnerFactory : RegexRunnerFactory
 692        {
 693            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 694            protected override RegexRunner CreateInstance() => new Runner();
 695
 696            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 697            private sealed class Runner : RegexRunner
 698            {
 699                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 700                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 701                protected override void Scan(ReadOnlySpan<char> inputSpan)
 702                {
 703                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the
 704                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
 705                           !TryMatchAtCurrentPosition(inputSpan) &&
 706                           base.runtextpos != inputSpan.Length)
 707                    {
 708                        base.runtextpos++;
 709                        if (Utilities.s_hasTimeout)
 710                        {
 711                            base.CheckTimeout();
 712                        }
 713                    }
 714                }
 715
 716                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 717                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 718                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 719                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 720                {
 721                    int pos = base.runtextpos;
 722
 723                    // Empty matches aren't possible.
 724                    if ((uint)pos < (uint)inputSpan.Length)
 725                    {
 726                        // The pattern begins with a character in the set [a-z].
 727                        // Find the next occurrence. If it can't be found, there's no match.
 728                        int i = inputSpan.Slice(pos).IndexOfAnyInRange('a', 'z');
 729                        if (i >= 0)
 730                        {
 731                            base.runtextpos = pos + i;
 732                            return true;
 733                        }
 734                    }
 735
 736                    // No match found.
 737                    base.runtextpos = inputSpan.Length;
 738                    return false;
 739                }
 740
 741                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 742                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 743                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 744                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 745                {
 746                    int pos = base.runtextpos;
 747                    int matchStart = pos;
 748                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 749
 750                    // Match a character in the set [a-z] atomically at least once.
 751                    {
 752                        int iteration = slice.IndexOfAnyExceptInRange('a', 'z');
 753                        if (iteration < 0)
 754                        {
 755                            iteration = slice.Length;
 756                        }
 757
 758                        if (iteration == 0)
 759                        {
 760                            return false; // The input didn't match.
 761                        }
 762
 763                        slice = slice.Slice(iteration);
 764                        pos += iteration;
 765                    }
 766
 767                    // The input matched.
 768                    base.runtextpos = pos;
 769                    base.Capture(0, matchStart, pos);
 770                    return true;
 771                }
 772            }
 773        }
 774
 775    }
 776
 777    /// <summary>Custom <see cref="Regex"/>-derived type for the HasUpperChar method.</summary>
 778    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
 779    file sealed class HasUpperChar_3 : Regex
 780    {
 781        /// <summary>Cached, thread-safe singleton instance.</summary>
 782        internal static readonly HasUpperChar_3 Instance = new();
 783
 784        /// <summary>Initializes the instance.</summary>
 785        private HasUpperChar_3()
 786        {
 787            base.pattern = "[A-Z]+";
 788            base.roptions = RegexOptions.None;
 789            ValidateMatchTimeout(Utilities.s_defaultTimeout);
 790            base.internalMatchTimeout = Utilities.s_defaultTimeout;
 791            base.factory = new RunnerFactory();
 792            base.capsize = 1;
 793        }
 794
 795        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 796        private sealed class RunnerFactory : RegexRunnerFactory
 797        {
 798            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 799            protected override RegexRunner CreateInstance() => new Runner();
 800
 801            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 802            private sealed class Runner : RegexRunner
 803            {
 804                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 805                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 806                protected override void Scan(ReadOnlySpan<char> inputSpan)
 807                {
 808                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the
 809                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
 810                           !TryMatchAtCurrentPosition(inputSpan) &&
 811                           base.runtextpos != inputSpan.Length)
 812                    {
 813                        base.runtextpos++;
 814                        if (Utilities.s_hasTimeout)
 815                        {
 816                            base.CheckTimeout();
 817                        }
 818                    }
 819                }
 820
 821                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 822                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 823                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 824                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 825                {
 826                    int pos = base.runtextpos;
 827
 828                    // Empty matches aren't possible.
 829                    if ((uint)pos < (uint)inputSpan.Length)
 830                    {
 831                        // The pattern begins with a character in the set [A-Z].
 832                        // Find the next occurrence. If it can't be found, there's no match.
 833                        int i = inputSpan.Slice(pos).IndexOfAnyInRange('A', 'Z');
 834                        if (i >= 0)
 835                        {
 836                            base.runtextpos = pos + i;
 837                            return true;
 838                        }
 839                    }
 840
 841                    // No match found.
 842                    base.runtextpos = inputSpan.Length;
 843                    return false;
 844                }
 845
 846                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 847                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 848                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 849                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 850                {
 851                    int pos = base.runtextpos;
 852                    int matchStart = pos;
 853                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 854
 855                    // Match a character in the set [A-Z] atomically at least once.
 856                    {
 857                        int iteration = slice.IndexOfAnyExceptInRange('A', 'Z');
 858                        if (iteration < 0)
 859                        {
 860                            iteration = slice.Length;
 861                        }
 862
 863                        if (iteration == 0)
 864                        {
 865                            return false; // The input didn't match.
 866                        }
 867
 868                        slice = slice.Slice(iteration);
 869                        pos += iteration;
 870                    }
 871
 872                    // The input matched.
 873                    base.runtextpos = pos;
 874                    base.Capture(0, matchStart, pos);
 875                    return true;
 876                }
 877            }
 878        }
 879
 880    }
 881
 882    /// <summary>Custom <see cref="Regex"/>-derived type for the HasNumberLowerAndUpperChar method.</summary>
 883    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
 884    file sealed class HasNumberLowerAndUpperChar_4 : Regex
 885    {
 886        /// <summary>Cached, thread-safe singleton instance.</summary>
 887        internal static readonly HasNumberLowerAndUpperChar_4 Instance = new();
 888
 889        /// <summary>Initializes the instance.</summary>
 890        private HasNumberLowerAndUpperChar_4()
 891        {
 892            base.pattern = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$";
 893            base.roptions = RegexOptions.None;
 894            ValidateMatchTimeout(Utilities.s_defaultTimeout);
 895            base.internalMatchTimeout = Utilities.s_defaultTimeout;
 896            base.factory = new RunnerFactory();
 897            base.capsize = 1;
 898        }
 899
 900        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c
 901        private sealed class RunnerFactory : RegexRunnerFactory
 902        {
 903            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum
 904            protected override RegexRunner CreateInstance() => new Runner();
 905
 906            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio
 907            private sealed class Runner : RegexRunner
 908            {
 909                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</
 910                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 911                protected override void Scan(ReadOnlySpan<char> inputSpan)
 912                {
 913                    // The pattern is anchored.  Validate the current position and try to match at it only.
 914                    if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
 915                    {
 916                        base.runtextpos = inputSpan.Length;
 917                    }
 918                }
 919
 920                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m
 921                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 922                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
 923                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
 924                {
 925                    int pos = base.runtextpos;
 926
 927                    // Empty matches aren't possible.
 928                    if ((uint)pos < (uint)inputSpan.Length)
 929                    {
 930                        // The pattern leads with a beginning (\A) anchor.
 931                        if (pos == 0)
 932                        {
 933                            return true;
 934                        }
 935                    }
 936
 937                    // No match found.
 938                    base.runtextpos = inputSpan.Length;
 939                    return false;
 940                }
 941
 942                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regula
 943                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
 944                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
 945                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
 946                {
 947                    int pos = base.runtextpos;
 948                    int matchStart = pos;
 949                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
 950                    int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
 951                    int charloop_starting_pos2 = 0, charloop_ending_pos2 = 0;
 952                    int charloop_starting_pos3 = 0, charloop_ending_pos3 = 0;
 953                    int stackpos = 0;
 954                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
 955
 956                    // Match if at the beginning of the string.
 957                    if (pos != 0)
 958                    {
 959                        return false; // The input didn't match.
 960                    }
 961
 962                    // Zero-width positive lookahead.
 963                    {
 964                        int positivelookahead_starting_pos = pos;
 965
 966                        if (Utilities.s_hasTimeout)
 967                        {
 968                            base.CheckTimeout();
 969                        }
 970
 971                        int atomic_stackpos = stackpos;
 972
 973                        // Match a character other than '\n' greedily any number of times.
 974                        //{
 975                            charloop_starting_pos = pos;
 976
 977                            int iteration = slice.IndexOf('\n');
 978                            if (iteration < 0)
 979                            {
 980                                iteration = slice.Length;
 981                            }
 982
 983                            slice = slice.Slice(iteration);
 984                            pos += iteration;
 985
 986                            charloop_ending_pos = pos;
 987                            goto CharLoopEnd;
 988
 989                            CharLoopBacktrack:
 990
 991                            if (Utilities.s_hasTimeout)
 992                            {
 993                                base.CheckTimeout();
 994                            }
 995
 996                            if (charloop_starting_pos >= charloop_ending_pos ||
 997                                (charloop_ending_pos = inputSpan.Slice(charloop_starting_pos, charloop_ending_pos - char
 998                            {
 999                                return false; // The input didn't match.
 1000                            }
 1001                            charloop_ending_pos += charloop_starting_pos;
 1002                            pos = charloop_ending_pos;
 1003                            slice = inputSpan.Slice(pos);
 1004
 1005                            CharLoopEnd:
 1006                        //}
 1007
 1008                        // Match a character in the set [a-z].
 1009                        if (slice.IsEmpty || !char.IsAsciiLetterLower(slice[0]))
 1010                        {
 1011                            goto CharLoopBacktrack;
 1012                        }
 1013
 1014                        stackpos = atomic_stackpos;
 1015
 1016                        pos = positivelookahead_starting_pos;
 1017                        slice = inputSpan.Slice(pos);
 1018                    }
 1019
 1020                    // Zero-width positive lookahead.
 1021                    {
 1022                        int positivelookahead_starting_pos1 = pos;
 1023
 1024                        if (Utilities.s_hasTimeout)
 1025                        {
 1026                            base.CheckTimeout();
 1027                        }
 1028
 1029                        int atomic_stackpos1 = stackpos;
 1030
 1031                        // Match a character other than '\n' greedily any number of times.
 1032                        //{
 1033                            charloop_starting_pos1 = pos;
 1034
 1035                            int iteration1 = slice.IndexOf('\n');
 1036                            if (iteration1 < 0)
 1037                            {
 1038                                iteration1 = slice.Length;
 1039                            }
 1040
 1041                            slice = slice.Slice(iteration1);
 1042                            pos += iteration1;
 1043
 1044                            charloop_ending_pos1 = pos;
 1045                            goto CharLoopEnd1;
 1046
 1047                            CharLoopBacktrack1:
 1048
 1049                            if (Utilities.s_hasTimeout)
 1050                            {
 1051                                base.CheckTimeout();
 1052                            }
 1053
 1054                            if (charloop_starting_pos1 >= charloop_ending_pos1 ||
 1055                                (charloop_ending_pos1 = inputSpan.Slice(charloop_starting_pos1, charloop_ending_pos1 - c
 1056                            {
 1057                                return false; // The input didn't match.
 1058                            }
 1059                            charloop_ending_pos1 += charloop_starting_pos1;
 1060                            pos = charloop_ending_pos1;
 1061                            slice = inputSpan.Slice(pos);
 1062
 1063                            CharLoopEnd1:
 1064                        //}
 1065
 1066                        // Match a character in the set [A-Z].
 1067                        if (slice.IsEmpty || !char.IsAsciiLetterUpper(slice[0]))
 1068                        {
 1069                            goto CharLoopBacktrack1;
 1070                        }
 1071
 1072                        stackpos = atomic_stackpos1;
 1073
 1074                        pos = positivelookahead_starting_pos1;
 1075                        slice = inputSpan.Slice(pos);
 1076                    }
 1077
 1078                    // Zero-width positive lookahead.
 1079                    {
 1080                        int positivelookahead_starting_pos2 = pos;
 1081
 1082                        if (Utilities.s_hasTimeout)
 1083                        {
 1084                            base.CheckTimeout();
 1085                        }
 1086
 1087                        int atomic_stackpos2 = stackpos;
 1088
 1089                        // Match a character other than '\n' greedily any number of times.
 1090                        //{
 1091                            charloop_starting_pos2 = pos;
 1092
 1093                            int iteration2 = slice.IndexOf('\n');
 1094                            if (iteration2 < 0)
 1095                            {
 1096                                iteration2 = slice.Length;
 1097                            }
 1098
 1099                            slice = slice.Slice(iteration2);
 1100                            pos += iteration2;
 1101
 1102                            charloop_ending_pos2 = pos;
 1103                            goto CharLoopEnd2;
 1104
 1105                            CharLoopBacktrack2:
 1106
 1107                            if (Utilities.s_hasTimeout)
 1108                            {
 1109                                base.CheckTimeout();
 1110                            }
 1111
 1112                            if (charloop_starting_pos2 >= charloop_ending_pos2)
 1113                            {
 1114                                return false; // The input didn't match.
 1115                            }
 1116                            pos = --charloop_ending_pos2;
 1117                            slice = inputSpan.Slice(pos);
 1118
 1119                            CharLoopEnd2:
 1120                        //}
 1121
 1122                        // Match a Unicode digit.
 1123                        if (slice.IsEmpty || !char.IsDigit(slice[0]))
 1124                        {
 1125                            goto CharLoopBacktrack2;
 1126                        }
 1127
 1128                        stackpos = atomic_stackpos2;
 1129
 1130                        pos = positivelookahead_starting_pos2;
 1131                        slice = inputSpan.Slice(pos);
 1132                    }
 1133
 1134                    // Match a character other than '\n' greedily at least once.
 1135                    //{
 1136                        charloop_starting_pos3 = pos;
 1137
 1138                        int iteration3 = slice.IndexOf('\n');
 1139                        if (iteration3 < 0)
 1140                        {
 1141                            iteration3 = slice.Length;
 1142                        }
 1143
 1144                        if (iteration3 == 0)
 1145                        {
 1146                            return false; // The input didn't match.
 1147                        }
 1148
 1149                        slice = slice.Slice(iteration3);
 1150                        pos += iteration3;
 1151
 1152                        charloop_ending_pos3 = pos;
 1153                        charloop_starting_pos3++;
 1154                        goto CharLoopEnd3;
 1155
 1156                        CharLoopBacktrack3:
 1157
 1158                        if (Utilities.s_hasTimeout)
 1159                        {
 1160                            base.CheckTimeout();
 1161                        }
 1162
 1163                        if (charloop_starting_pos3 >= charloop_ending_pos3)
 1164                        {
 1165                            return false; // The input didn't match.
 1166                        }
 1167                        pos = --charloop_ending_pos3;
 1168                        slice = inputSpan.Slice(pos);
 1169
 1170                        CharLoopEnd3:
 1171                    //}
 1172
 1173                    // Match if at the end of the string or if before an ending newline.
 1174                    if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
 1175                    {
 1176                        goto CharLoopBacktrack3;
 1177                    }
 1178
 1179                    // The input matched.
 1180                    base.runtextpos = pos;
 1181                    base.Capture(0, matchStart, pos);
 1182                    return true;
 1183                }
 1184            }
 1185        }
 1186
 1187    }
 1188
 1189    /// <summary>Helper methods used by generated <see cref="Regex"/>-derived implementations.</summary>
 1190    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
 1191    file static class Utilities
 1192    {
 1193        /// <summary>Default timeout value set in <see cref="AppContext"/>, or <see cref="Regex.InfiniteMatchTimeout"/> 
 1194        internal static readonly TimeSpan s_defaultTimeout = AppContext.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") is TimeSp
 1195
 1196        /// <summary>Whether <see cref="s_defaultTimeout"/> is non-infinite.</summary>
 1197        internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
 1198
 1199        /// <summary>Pushes 2 values onto the backtracking stack.</summary>
 1200        [MethodImpl(MethodImplOptions.AggressiveInlining)]
 1201        internal static void StackPush(ref int[] stack, ref int pos, int arg0, int arg1)
 1202        {
 1203            // If there's space available for all 2 values, store them.
 1204            int[] s = stack;
 1205            int p = pos;
 1206            if ((uint)(p + 1) < (uint)s.Length)
 1207            {
 1208                s[p] = arg0;
 1209                s[p + 1] = arg1;
 1210                pos += 2;
 1211                return;
 1212            }
 1213
 1214            // Otherwise, resize the stack to make room and try again.
 1215            WithResize(ref stack, ref pos, arg0, arg1);
 1216
 1217            // <summary>Resize the backtracking stack array and push 2 values onto the stack.</summary>
 1218            [MethodImpl(MethodImplOptions.NoInlining)]
 1219            static void WithResize(ref int[] stack, ref int pos, int arg0, int arg1)
 1220            {
 1221                Array.Resize(ref stack, (pos + 1) * 2);
 1222                StackPush(ref stack, ref pos, arg0, arg1);
 1223            }
 1224        }
 1225    }
 1226}