|
// <auto-generated/>
#nullable enable
#pragma warning disable
namespace Aspire.Azure.Storage.Blobs
{
partial class AzureBlobStorageContainerSettings
{
/// <remarks>
/// Pattern:<br/>
/// <code>(?i)ContainerName\\s*=\\s*([^;]+);?</code><br/>
/// Options:<br/>
/// <code>RegexOptions.IgnoreCase</code><br/>
/// Explanation:<br/>
/// <code>
/// ○ Match a character in the set [Cc].<br/>
/// ○ Match a character in the set [Oo].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match a character in the set [Tt].<br/>
/// ○ Match a character in the set [Aa].<br/>
/// ○ Match a character in the set [Ii].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match a character in the set [Ee].<br/>
/// ○ Match a character in the set [Rr].<br/>
/// ○ Match a character in the set [Nn].<br/>
/// ○ Match a character in the set [Aa].<br/>
/// ○ Match a character in the set [Mm].<br/>
/// ○ Match a character in the set [Ee].<br/>
/// ○ Match a whitespace character atomically any number of times.<br/>
/// ○ Match '='.<br/>
/// ○ Match a whitespace character greedily any number of times.<br/>
/// ○ 1st capture group.<br/>
/// ○ Match a character other than ';' atomically at least once.<br/>
/// ○ Match ';' atomically, optionally.<br/>
/// </code>
/// </remarks>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.11305")]
private static partial global::System.Text.RegularExpressions.Regex ContainerNameRegex() => global::System.Text.RegularExpressions.Generated.ContainerNameRegex_0.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 ContainerNameRegex method.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.11305")]
file sealed class ContainerNameRegex_0 : Regex
{
/// <summary>Cached, thread-safe singleton instance.</summary>
internal static readonly ContainerNameRegex_0 Instance = new();
/// <summary>Initializes the instance.</summary>
private ContainerNameRegex_0()
{
base.pattern = "(?i)ContainerName\\s*=\\s*([^;]+);?";
base.roptions = RegexOptions.IgnoreCase;
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 15 characters.
if (pos <= inputSpan.Length - 15)
{
// The pattern has the literal "containername" ordinal case-insensitive 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_containername_OrdinalIgnoreCase);
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_starting_pos = 0, charloop_ending_pos = 0;
ReadOnlySpan<char> slice = inputSpan.Slice(pos);
if ((uint)slice.Length < 13 ||
!slice.StartsWith("containername", StringComparison.OrdinalIgnoreCase)) // Match the string "containername" (ordinal case-insensitive)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a whitespace character atomically any number of times.
{
int iteration = 13;
while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
{
iteration++;
}
slice = slice.Slice(iteration);
pos += iteration;
}
// Match '='.
if (slice.IsEmpty || slice[0] != '=')
{
UncaptureUntil(0);
return false; // The input didn't match.
}
// Match a whitespace character greedily any number of times.
//{
pos++;
slice = inputSpan.Slice(pos);
charloop_starting_pos = pos;
int iteration1 = 0;
while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1]))
{
iteration1++;
}
slice = slice.Slice(iteration1);
pos += iteration1;
charloop_ending_pos = pos;
goto CharLoopEnd;
CharLoopBacktrack:
UncaptureUntil(charloop_capture_pos);
if (Utilities.s_hasTimeout)
{
base.CheckTimeout();
}
if (charloop_starting_pos >= charloop_ending_pos ||
(charloop_ending_pos = inputSpan.Slice(charloop_starting_pos, charloop_ending_pos - charloop_starting_pos).LastIndexOfAnyExcept(';')) < 0)
{
UncaptureUntil(0);
return false; // The input didn't match.
}
charloop_ending_pos += charloop_starting_pos;
pos = charloop_ending_pos;
slice = inputSpan.Slice(pos);
CharLoopEnd:
charloop_capture_pos = base.Crawlpos();
//}
// 1st capture group.
{
capture_starting_pos = pos;
// Match a character other than ';' atomically at least once.
{
int iteration2 = slice.IndexOf(';');
if (iteration2 < 0)
{
iteration2 = slice.Length;
}
if (iteration2 == 0)
{
goto CharLoopBacktrack;
}
slice = slice.Slice(iteration2);
pos += iteration2;
}
base.Capture(1, capture_starting_pos, pos);
}
// Match ';' atomically, optionally.
{
if (!slice.IsEmpty && slice[0] == ';')
{
slice = slice.Slice(1);
pos++;
}
}
// 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>Helper methods used by generated <see cref="Regex"/>-derived implementations.</summary>
[GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.11305")]
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 the string "containername".</summary>
internal static readonly SearchValues<string> s_indexOfString_containername_OrdinalIgnoreCase = SearchValues.Create(["containername"], StringComparison.OrdinalIgnoreCase);
}
}
|