| | | 1 | | // <auto-generated/> |
| | | 2 | | #nullable enable |
| | | 3 | | #pragma warning disable |
| | | 4 | | |
| | | 5 | | namespace ArturRios.Validation |
| | | 6 | | { |
| | | 7 | | partial class FluentValidator<T> |
| | | 8 | | { |
| | | 9 | | /// <remarks> |
| | | 10 | | /// Pattern:<br/> |
| | | 11 | | /// <code>['.]</code><br/> |
| | | 12 | | /// Explanation:<br/> |
| | | 13 | | /// <code> |
| | | 14 | | /// ○ Match a character in the set ['.].<br/> |
| | | 15 | | /// </code> |
| | | 16 | | /// </remarks> |
| | | 17 | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.374 |
| | | 18 | | private static partial global::System.Text.RegularExpressions.Regex SpecialChars() => global::System.Text.Regula |
| | | 19 | | } |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | namespace System.Text.RegularExpressions.Generated |
| | | 23 | | { |
| | | 24 | | using System; |
| | | 25 | | using System.Buffers; |
| | | 26 | | using System.CodeDom.Compiler; |
| | | 27 | | using System.Collections; |
| | | 28 | | using System.ComponentModel; |
| | | 29 | | using System.Globalization; |
| | | 30 | | using System.Runtime.CompilerServices; |
| | | 31 | | using System.Text.RegularExpressions; |
| | | 32 | | using System.Threading; |
| | | 33 | | |
| | | 34 | | /// <summary>Custom <see cref="Regex"/>-derived type for the SpecialChars method.</summary> |
| | | 35 | | [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.14.37416")] |
| | | 36 | | file sealed class SpecialChars_0 : Regex |
| | | 37 | | { |
| | | 38 | | /// <summary>Cached, thread-safe singleton instance.</summary> |
| | 1 | 39 | | internal static readonly SpecialChars_0 Instance = new(); |
| | | 40 | | |
| | | 41 | | /// <summary>Initializes the instance.</summary> |
| | 1 | 42 | | private SpecialChars_0() |
| | | 43 | | { |
| | 1 | 44 | | base.pattern = "['.]"; |
| | 1 | 45 | | base.roptions = RegexOptions.None; |
| | 1 | 46 | | base.internalMatchTimeout = TimeSpan.FromMilliseconds(100); |
| | 1 | 47 | | base.factory = new RunnerFactory(); |
| | 1 | 48 | | base.capsize = 1; |
| | 1 | 49 | | } |
| | | 50 | | |
| | | 51 | | /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see c |
| | | 52 | | private sealed class RunnerFactory : RegexRunnerFactory |
| | | 53 | | { |
| | | 54 | | /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</sum |
| | 1 | 55 | | protected override RegexRunner CreateInstance() => new Runner(); |
| | | 56 | | |
| | | 57 | | /// <summary>Provides the runner that contains the custom logic implementing the specified regular expressio |
| | | 58 | | private sealed class Runner : RegexRunner |
| | | 59 | | { |
| | | 60 | | /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</ |
| | | 61 | | /// <param name="inputSpan">The text being scanned by the regular expression.</param> |
| | | 62 | | protected override void Scan(ReadOnlySpan<char> inputSpan) |
| | | 63 | | { |
| | 54 | 64 | | if (TryFindNextPossibleStartingPosition(inputSpan)) |
| | | 65 | | { |
| | | 66 | | // The search in TryFindNextPossibleStartingPosition performed the entire match. |
| | 43 | 67 | | int start = base.runtextpos; |
| | 43 | 68 | | int end = base.runtextpos = start + 1; |
| | 43 | 69 | | base.Capture(0, start, end); |
| | | 70 | | } |
| | 54 | 71 | | } |
| | | 72 | | |
| | | 73 | | /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a m |
| | | 74 | | /// <param name="inputSpan">The text being scanned by the regular expression.</param> |
| | | 75 | | /// <returns>true if a possible match was found; false if no more matches are possible.</returns> |
| | | 76 | | private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan) |
| | | 77 | | { |
| | 54 | 78 | | int pos = base.runtextpos; |
| | | 79 | | |
| | | 80 | | // Empty matches aren't possible. |
| | 54 | 81 | | if ((uint)pos < (uint)inputSpan.Length) |
| | | 82 | | { |
| | | 83 | | // The pattern begins with a character in the set ['.]. |
| | | 84 | | // Find the next occurrence. If it can't be found, there's no match. |
| | 43 | 85 | | int i = inputSpan.Slice(pos).IndexOfAny('\'', '.'); |
| | 43 | 86 | | if (i >= 0) |
| | | 87 | | { |
| | 43 | 88 | | base.runtextpos = pos + i; |
| | 43 | 89 | | return true; |
| | | 90 | | } |
| | | 91 | | } |
| | | 92 | | |
| | | 93 | | // No match found. |
| | 11 | 94 | | base.runtextpos = inputSpan.Length; |
| | 11 | 95 | | return false; |
| | | 96 | | } |
| | | 97 | | } |
| | | 98 | | } |
| | | 99 | | |
| | | 100 | | } |
| | | 101 | | |
| | | 102 | | } |