|
// <auto-generated/>
#nullable enable
#pragma warning disable
namespace Microsoft.DotNet.Watch
{
partial class WebServerProcessStateObserver
{
/// <remarks>
/// Pattern:<br/>
/// <code>Now listening on: (?<url>.*)\s*$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.Compiled</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match the string "Now listening on: ".<br/>
/// ○ "url" capture group.<br/>
/// ○ Match a character other than '\n' greedily any number of times.<br/>
/// ○ Match a whitespace character greedily any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.26904")]
private static partial global::System.Text.RegularExpressions.Regex GetNowListeningOnRegex() => global::System.Text.RegularExpressions.Generated.GetNowListeningOnRegex_0.Instance;
}
}
namespace Microsoft.DotNet.Watch
{
partial class WebServerProcessStateObserver
{
/// <remarks>
/// Pattern:<br/>
/// <code>Login to the dashboard at (?<url>.*)\s*$</code><br/>
/// Options:<br/>
/// <code>RegexOptions.Compiled</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match the string "Login to the dashboard at ".<br/>
/// ○ "url" capture group.<br/>
/// ○ Match a character other than '\n' greedily any number of times.<br/>
/// ○ Match a whitespace character greedily any number of times.<br/>
/// ○ Match if at the end of the string or if before an ending newline.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.26904")]
private static partial global::System.Text.RegularExpressions.Regex GetAspireDashboardUrlRegex() => global::System.Text.RegularExpressions.Generated.GetAspireDashboardUrlRegex_1.Instance;
}
}
namespace Microsoft.DotNet.Watch
{
partial class BuildOutput
{
/// <remarks>
/// Pattern:<br/>
/// <code>[^:]+: (error|warning) [A-Za-z]+[0-9]+: .+</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match a character other than ':' atomically at least once.<br/>
/// ○ Match the string ": ".<br/>
/// ○ 1st capture group.<br/>
/// ○ Match with 2 alternative expressions.<br/>
/// ○ Match the string "error".<br/>
/// ○ Match the string "warning".<br/>
/// ○ Match ' '.<br/>
/// ○ Match an ASCII letter atomically at least once.<br/>
/// ○ Match a character in the set [0-9] atomically at least once.<br/>
/// ○ Match the string ": ".<br/>
/// ○ Match a character other than '\n' atomically at least once.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.26904")]
private static partial global::System.Text.RegularExpressions.Regex GetBuildDiagnosticRegex() => global::System.Text.RegularExpressions.Generated.GetBuildDiagnosticRegex_2.Instance;
}
}
namespace System.Text.RegularExpressions.Generated
{
using System;
using System.Buffers;
using System.CodeDom.Compiler;
using System.Collections;
using System.ComponentModel;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text.RegularExpressions;
using System.Threading;
/// <summary>Custom <see cref="Regex"/>-derived type for the GetNowListeningOnRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.26904")]
file sealed class GetNowListeningOnRegex_0 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly GetNowListeningOnRegex_0 Instance = new();
/// <summary>Initializes the instance.</summary>
private GetNowListeningOnRegex_0()
{
base.pattern = "Now listening on: (?<url>.*)\\s*$";
base.roptions = RegexOptions.Compiled;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "url", 1 } };
base.capslist = new string[] {"0", "url" };
base.capsize = 2;
}
/// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
private sealed class RunnerFactory : RegexRunnerFactory
{
/// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
protected override RegexRunner CreateInstance() => new Runner();
/// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
private sealed class Runner : RegexRunner
{
/// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
protected override void Scan(ReadOnlySpan<char> inputSpan)
{
// Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
while (TryFindNextPossibleStartingPosition(inputSpan) &&
!TryMatchAtCurrentPosition(inputSpan) &&
base.runtextpos != inputSpan.Length)
{
base.runtextpos++;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 18 characters.
if (pos <= inputSpan.Length - 18)
{
// The pattern has the literal "Now listening on: " at the beginning of the pattern. Find the next occurrence.
// If it can't be found, there's no match.
int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_96276B01C1276BB5CEEDBDA004C1E358097F2E4790D1CD1FB729AC034B750526);
if (i >= 0)
{
base.runtextpos = pos + i;
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
int matchStart = pos;
int capture_starting_pos = 0;
int charloop_capture_pos = 0;
int charloop_capture_pos1 = 0;
int charloop_starting_pos = 0, charloop_ending_pos = 0;
int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match the string "Now listening on: ".
if (!slice.StartsWith("Now listening on: "))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "url" capture group.
//{
pos += 18;
slice = inputSpan.Slice(pos);
capture_starting_pos = pos;
// Match a character other than '\n' greedily any number of times.
//{
charloop_starting_pos = pos;
int iteration = slice.IndexOf('\n');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
charloop_ending_pos = pos;
goto CharLoopEnd;
CharLoopBacktrack:
UncaptureUntil(charloop_capture_pos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos >= charloop_ending_pos)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
pos = --charloop_ending_pos;
slice = inputSpan.Slice(pos);
CharLoopEnd:
charloop_capture_pos = base.Crawlpos();
//}
base.Capture(1, capture_starting_pos, pos);
goto CaptureSkipBacktrack;
CaptureBacktrack:
goto CharLoopBacktrack;
CaptureSkipBacktrack:;
//}
// Match a whitespace character greedily any number of times.
//{
charloop_starting_pos1 = pos;
int iteration1 = 0;
while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1]))
{
iteration1++;
}
slice = slice.Slice(iteration1);
pos += iteration1;
charloop_ending_pos1 = pos;
goto CharLoopEnd1;
CharLoopBacktrack1:
UncaptureUntil(charloop_capture_pos1);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos1 >= charloop_ending_pos1)
{
goto CaptureBacktrack;
}
pos = --charloop_ending_pos1;
slice = inputSpan.Slice(pos);
CharLoopEnd1:
charloop_capture_pos1 = base.Crawlpos();
//}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
goto CharLoopBacktrack1;
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the GetAspireDashboardUrlRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.26904")]
file sealed class GetAspireDashboardUrlRegex_1 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly GetAspireDashboardUrlRegex_1 Instance = new();
/// <summary>Initializes the instance.</summary>
private GetAspireDashboardUrlRegex_1()
{
base.pattern = "Login to the dashboard at (?<url>.*)\\s*$";
base.roptions = RegexOptions.Compiled;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.CapNames = new Hashtable { { "0", 0 } , { "url", 1 } };
base.capslist = new string[] {"0", "url" };
base.capsize = 2;
}
/// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
private sealed class RunnerFactory : RegexRunnerFactory
{
/// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
protected override RegexRunner CreateInstance() => new Runner();
/// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
private sealed class Runner : RegexRunner
{
/// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
protected override void Scan(ReadOnlySpan<char> inputSpan)
{
// Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
while (TryFindNextPossibleStartingPosition(inputSpan) &&
!TryMatchAtCurrentPosition(inputSpan) &&
base.runtextpos != inputSpan.Length)
{
base.runtextpos++;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 26 characters.
if (pos <= inputSpan.Length - 26)
{
// The pattern has the literal "Login to the dashboard at " at the beginning of the pattern. Find the next occurrence.
// If it can't be found, there's no match.
int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_F5813B88945F49B45ED7FFDFE9559D9201C0782F73CC2CB43535DF2AFF67A7CE);
if (i >= 0)
{
base.runtextpos = pos + i;
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
int matchStart = pos;
int capture_starting_pos = 0;
int charloop_capture_pos = 0;
int charloop_capture_pos1 = 0;
int charloop_starting_pos = 0, charloop_ending_pos = 0;
int charloop_starting_pos1 = 0, charloop_ending_pos1 = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match the string "Login to the dashboard at ".
if (!slice.StartsWith("Login to the dashboard at "))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// "url" capture group.
//{
pos += 26;
slice = inputSpan.Slice(pos);
capture_starting_pos = pos;
// Match a character other than '\n' greedily any number of times.
//{
charloop_starting_pos = pos;
int iteration = slice.IndexOf('\n');
if (iteration < 0)
{
iteration = slice.Length;
}
slice = slice.Slice(iteration);
pos += iteration;
charloop_ending_pos = pos;
goto CharLoopEnd;
CharLoopBacktrack:
UncaptureUntil(charloop_capture_pos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos >= charloop_ending_pos)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
pos = --charloop_ending_pos;
slice = inputSpan.Slice(pos);
CharLoopEnd:
charloop_capture_pos = base.Crawlpos();
//}
base.Capture(1, capture_starting_pos, pos);
goto CaptureSkipBacktrack;
CaptureBacktrack:
goto CharLoopBacktrack;
CaptureSkipBacktrack:;
//}
// Match a whitespace character greedily any number of times.
//{
charloop_starting_pos1 = pos;
int iteration1 = 0;
while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1]))
{
iteration1++;
}
slice = slice.Slice(iteration1);
pos += iteration1;
charloop_ending_pos1 = pos;
goto CharLoopEnd1;
CharLoopBacktrack1:
UncaptureUntil(charloop_capture_pos1);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos1 >= charloop_ending_pos1)
{
goto CaptureBacktrack;
}
pos = --charloop_ending_pos1;
slice = inputSpan.Slice(pos);
CharLoopEnd1:
charloop_capture_pos1 = base.Crawlpos();
//}
// Match if at the end of the string or if before an ending newline.
if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
{
goto CharLoopBacktrack1;
}
// The input matched.
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Custom <see cref="Regex"/>-derived type for the GetBuildDiagnosticRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.26904")]
file sealed class GetBuildDiagnosticRegex_2 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly GetBuildDiagnosticRegex_2 Instance = new();
/// <summary>Initializes the instance.</summary>
private GetBuildDiagnosticRegex_2()
{
base.pattern = "[^:]+: (error|warning) [A-Za-z]+[0-9]+: .+";
base.roptions = RegexOptions.None;
ValidateMatchTimeout(Utilities.s_defaultTimeout);
base.internalMatchTimeout = Utilities.s_defaultTimeout;
base.factory = new RunnerFactory();
base.capsize = 2;
}
/// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
private sealed class RunnerFactory : RegexRunnerFactory
{
/// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
protected override RegexRunner CreateInstance() => new Runner();
/// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
private sealed class Runner : RegexRunner
{
/// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
protected override void Scan(ReadOnlySpan<char> inputSpan)
{
// Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
while (TryFindNextPossibleStartingPosition(inputSpan) &&
!TryMatchAtCurrentPosition(inputSpan) &&
base.runtextpos != inputSpan.Length)
{
base.runtextpos++;
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
}
}
/// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if a possible match was found; false if no more matches are possible.</returns>
private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
// Any possible match is at least 14 characters.
if (pos <= inputSpan.Length - 14)
{
// The pattern begins with a character in the set [^:].
// Find the next occurrence. If it can't be found, there's no match.
int i = inputSpan.Slice(pos).IndexOfAnyExcept(':');
if (i >= 0)
{
base.runtextpos = pos + i;
return true;
}
}
// No match found.
base.runtextpos = inputSpan.Length;
return false;
}
/// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
/// <param name="inputSpan">The text being scanned by the regular expression.</param>
/// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
{
int pos = base.runtextpos;
int matchStart = pos;
int capture_starting_pos = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
// Match a character other than ':' atomically at least once.
{
int iteration = slice.IndexOf(':');
if (iteration < 0)
{
iteration = slice.Length;
}
if (iteration == 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
slice = slice.Slice(iteration);
pos += iteration;
}
// Advance the next matching position.
if (base.runtextpos < pos)
{
base.runtextpos = pos;
}
// Match the string ": ".
if (!slice.StartsWith(": "))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// 1st capture group.
//{
pos += 2;
slice = inputSpan.Slice(pos);
capture_starting_pos = pos;
// Match with 2 alternative expressions.
//{
if (slice.IsEmpty)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
switch (slice[0])
{
case 'e':
// Match the string "rror".
if (!slice.Slice(1).StartsWith("rror"))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
pos += 5;
slice = inputSpan.Slice(pos);
break;
case 'w':
// Match the string "arning".
if (!slice.Slice(1).StartsWith("arning"))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
pos += 7;
slice = inputSpan.Slice(pos);
break;
default:
UncaptureUntil(0);
return false; // The input didn't match.
}
//}
base.Capture(1, capture_starting_pos, pos);
//}
// Match ' '.
if (slice.IsEmpty || slice[0] != ' ')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match an ASCII letter atomically at least once.
{
int iteration1 = slice.Slice(1).IndexOfAnyExcept(Utilities.s_asciiLetters);
if (iteration1 < 0)
{
iteration1 = slice.Length - 1;
}
if (iteration1 == 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
slice = slice.Slice(iteration1);
pos += iteration1;
}
// Match a character in the set [0-9] atomically at least once.
{
int iteration2 = slice.Slice(1).IndexOfAnyExceptInRange('0', '9');
if (iteration2 < 0)
{
iteration2 = slice.Length - 1;
}
if (iteration2 == 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
// Match the string ": ".
if (!slice.Slice(1).StartsWith(": "))
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a character other than '\n' atomically at least once.
{
int iteration3 = slice.Slice(3).IndexOf('\n');
if (iteration3 < 0)
{
iteration3 = slice.Length - 3;
}
if (iteration3 == 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
slice = slice.Slice(iteration3);
pos += iteration3;
}
// The input matched.
pos += 3;
base.runtextpos = pos;
base.Capture(0, matchStart, pos);
return true;
// <summary>Undo captures until it reaches the specified capture position.</summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
void UncaptureUntil(int capturePosition)
{
while (base.Crawlpos() > capturePosition)
{
base.Uncapture();
}
}
}
}
}
}
/// <summary>Helper methods used by generated <see cref="Regex"/>-derived implementations.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "11.0.14.26904")]
file static class Utilities
{
/// <summary>Default timeout value set in <see cref="AppContext"/>, or <see cref="Regex.InfiniteMatchTimeout"/> if none was set.</summary>
internal static readonly TimeSpan s_defaultTimeout = AppContext.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") is TimeSpan timeout ? timeout : Regex.InfiniteMatchTimeout;
/// <summary>Whether <see cref="s_defaultTimeout"/> is non-infinite.</summary>
internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
/// <summary>Supports searching for characters in or not in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".</summary>
internal static readonly SearchValues<char> s_asciiLetters = SearchValues.Create("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz");
/// <summary>Supports searching for the string "Now listening on: ".</summary>
internal static readonly SearchValues<string> s_indexOfString_96276B01C1276BB5CEEDBDA004C1E358097F2E4790D1CD1FB729AC034B750526 = SearchValues.Create(["Now listening on: "], StringComparison.Ordinal);
/// <summary>Supports searching for the string "Login to the dashboard at ".</summary>
internal static readonly SearchValues<string> s_indexOfString_F5813B88945F49B45ED7FFDFE9559D9201C0782F73CC2CB43535DF2AFF67A7CE = SearchValues.Create(["Login to the dashboard at "], StringComparison.Ordinal);
}
}
|