67 references to MemoryExtensions
Microsoft.AspNetCore.Components (2)
NavigationManager.cs (2)
295
if (
MemoryExtensions
.StartsWith(uri, _baseUri!.OriginalString.AsSpan(), StringComparison.Ordinal))
304
if (_baseUri.OriginalString.EndsWith('/') &&
MemoryExtensions
.Equals(uriPathOnly, _baseUri.OriginalString.AsSpan(0, _baseUri.OriginalString.Length - 1), StringComparison.Ordinal))
Microsoft.AspNetCore.Components.Endpoints (5)
FormMapping\FormKey.cs (1)
18
MemoryExtensions
.Equals(Value.Span, other.Value.Span, StringComparison.OrdinalIgnoreCase);
FormMapping\PrefixResolver.cs (3)
65
return
MemoryExtensions
.CompareTo(x.Value.Span[currentXPos..], y.Value.Span[currentYPos..], StringComparison.Ordinal);
80
var match =
MemoryExtensions
.CompareTo(
90
var compareResult =
MemoryExtensions
.CompareTo(segmentX, segmentY, StringComparison.Ordinal);
Rendering\EndpointHtmlRenderer.Streaming.cs (1)
140
MemoryExtensions
.Sort(componentIdsInDepthOrder, static (left, right) => left.Depth - right.Depth);
Microsoft.AspNetCore.Http.Extensions (5)
RequestDelegateFactory.cs (1)
125
private static readonly MethodInfo AsMemoryMethod = new Func<char[]?, int, int, Memory<char>>(
MemoryExtensions
.AsMemory).Method;
src\Components\Endpoints\src\FormMapping\FormKey.cs (1)
18
MemoryExtensions
.Equals(Value.Span, other.Value.Span, StringComparison.OrdinalIgnoreCase);
src\Components\Endpoints\src\FormMapping\PrefixResolver.cs (3)
65
return
MemoryExtensions
.CompareTo(x.Value.Span[currentXPos..], y.Value.Span[currentYPos..], StringComparison.Ordinal);
80
var match =
MemoryExtensions
.CompareTo(
90
var compareResult =
MemoryExtensions
.CompareTo(segmentX, segmentY, StringComparison.Ordinal);
Microsoft.AspNetCore.Routing (10)
Matching\ContentEncodingNegotiationMatcherPolicy.cs (2)
20
MemoryExtensions
.Equals("identity".AsSpan(), candidate, StringComparison.OrdinalIgnoreCase) ||
21
MemoryExtensions
.Equals("*".AsSpan(), candidate, StringComparison.OrdinalIgnoreCase);
Matching\HostMatcherPolicy.cs (4)
105
if (host.Length == 0 ||
MemoryExtensions
.Equals(host, WildcardHost, StringComparison.OrdinalIgnoreCase))
113
MemoryExtensions
.EndsWith(requestHost, host.Slice(WildcardHost.Length), StringComparison.OrdinalIgnoreCase))
117
else if (
MemoryExtensions
.Equals(requestHost, host, StringComparison.OrdinalIgnoreCase))
127
if (
MemoryExtensions
.Equals(port, WildcardHost, StringComparison.OrdinalIgnoreCase))
Matching\ILEmitTrieFactory.cs (3)
689
AsSpan = typeof(
MemoryExtensions
).GetMethod(
690
nameof(
MemoryExtensions
.AsSpan),
750
/// <see cref="
MemoryExtensions
.AsSpan(string, int, int)"/>
Matching\NegotiationMatcherPolicy.cs (1)
120
if (
MemoryExtensions
.Equals(metadata.AsSpan(), value.Value.AsSpan(), StringComparison.OrdinalIgnoreCase))
Microsoft.Build (2)
BackEnd\Shared\BuildRequestConfiguration.cs (1)
303
if (
MemoryExtensions
.Equals(Microsoft.IO.Path.GetFileName(ProjectFullPath.AsSpan()), "dirs.proj".AsSpan(), StringComparison.OrdinalIgnoreCase))
FileMatcher.cs (1)
1710
return
MemoryExtensions
.Equals(input.Slice(iIndex, 1), pattern.AsSpan(pIndex, 1), StringComparison.OrdinalIgnoreCase);
Microsoft.Build.Tasks.Core (1)
FileMatcher.cs (1)
1710
return
MemoryExtensions
.Equals(input.Slice(iIndex, 1), pattern.AsSpan(pIndex, 1), StringComparison.OrdinalIgnoreCase);
Microsoft.Build.Utilities.Core (1)
FileMatcher.cs (1)
1710
return
MemoryExtensions
.Equals(input.Slice(iIndex, 1), pattern.AsSpan(pIndex, 1), StringComparison.OrdinalIgnoreCase);
Microsoft.Maui.Controls.Xaml (1)
XamlLoader.cs (1)
432
if (!
MemoryExtensions
.Equals(slice, fullName.AsSpan(), StringComparison.Ordinal))
mscorlib (1)
mscorlib.cs (1)
25
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MemoryExtensions
))]
netstandard (1)
netstandard.cs (1)
1053
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MemoryExtensions
))]
System.Memory (1)
artifacts\obj\System.Memory\Debug\net10.0\System.Memory.Forwards.cs (1)
14
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.
MemoryExtensions
))]
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValuesBase.cs (1)
13
/// <see cref="
MemoryExtensions
.IndexOfAny(ReadOnlySpan{char}, SearchValues{string})"/> is the main
src\libraries\System.Private.CoreLib\src\System\Text\SpanLineEnumerator.cs (1)
10
/// To get an instance of this type, use <see cref="
MemoryExtensions
.EnumerateLines(ReadOnlySpan{char})"/>.
System.Text.Json (1)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
73
MemoryExtensions
.Sort(keys, span);
System.Text.RegularExpressions (33)
System\Text\RegularExpressions\RegexCompiler.cs (31)
68
private static MethodInfo SpanIndexOfCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
69
private static MethodInfo SpanIndexOfSpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
70
private static MethodInfo SpanIndexOfSpanStringComparisonMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOf", [typeof(ReadOnlySpan<char>), typeof(ReadOnlySpan<char>), typeof(StringComparison)])!;
71
private static MethodInfo SpanIndexOfAnyCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
72
private static MethodInfo SpanIndexOfAnyCharCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
73
private static MethodInfo SpanIndexOfAnySpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
74
private static MethodInfo SpanIndexOfAnySearchValuesMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
75
private static MethodInfo SpanIndexOfAnySearchValuesStringMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAny", [typeof(ReadOnlySpan<char>), typeof(SearchValues<string>)])!;
76
private static MethodInfo SpanIndexOfAnyExceptCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
77
private static MethodInfo SpanIndexOfAnyExceptCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
78
private static MethodInfo SpanIndexOfAnyExceptCharCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
79
private static MethodInfo SpanIndexOfAnyExceptSpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
80
private static MethodInfo SpanIndexOfAnyExceptSearchValuesMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
81
private static MethodInfo SpanIndexOfAnyInRangeMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
82
private static MethodInfo SpanIndexOfAnyExceptInRangeMethod => field ??= typeof(
MemoryExtensions
).GetMethod("IndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
83
private static MethodInfo SpanLastIndexOfCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
84
private static MethodInfo SpanLastIndexOfAnyCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
85
private static MethodInfo SpanLastIndexOfAnyCharCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
86
private static MethodInfo SpanLastIndexOfAnySpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
87
private static MethodInfo SpanLastIndexOfAnySearchValuesMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAny", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
88
private static MethodInfo SpanLastIndexOfSpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOf", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
89
private static MethodInfo SpanLastIndexOfAnyExceptCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
90
private static MethodInfo SpanLastIndexOfAnyExceptCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
91
private static MethodInfo SpanLastIndexOfAnyExceptCharCharCharMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
92
private static MethodInfo SpanLastIndexOfAnyExceptSpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
93
private static MethodInfo SpanLastIndexOfAnyExceptSearchValuesMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAnyExcept", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(SearchValues<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
94
private static MethodInfo SpanLastIndexOfAnyInRangeMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAnyInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
95
private static MethodInfo SpanLastIndexOfAnyExceptInRangeMethod => field ??= typeof(
MemoryExtensions
).GetMethod("LastIndexOfAnyExceptInRange", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), Type.MakeGenericMethodParameter(0), Type.MakeGenericMethodParameter(0)])!.MakeGenericMethod(typeof(char));
98
private static MethodInfo SpanStartsWithSpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("StartsWith", [typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0)), typeof(ReadOnlySpan<>).MakeGenericType(Type.MakeGenericMethodParameter(0))])!.MakeGenericMethod(typeof(char));
99
private static MethodInfo SpanStartsWithSpanComparisonMethod => field ??= typeof(
MemoryExtensions
).GetMethod("StartsWith", [typeof(ReadOnlySpan<char>), typeof(ReadOnlySpan<char>), typeof(StringComparison)])!;
100
private static MethodInfo StringAsSpanMethod => field ??= typeof(
MemoryExtensions
).GetMethod("AsSpan", [typeof(string)])!;
System\Text\RegularExpressions\Symbolic\BitVector.cs (2)
191
MemoryExtensions
.SequenceEqual(new ReadOnlySpan<ulong>(_blocks), new ReadOnlySpan<ulong>(other._blocks));
195
MemoryExtensions
.SequenceCompareTo(new ReadOnlySpan<ulong>(_blocks), new ReadOnlySpan<ulong>(other._blocks));
xunit.assert (1)
EqualityAsserts.cs (1)
51
/// If <see cref="
MemoryExtensions
.SequenceEqual{T}(Span{T}, ReadOnlySpan{T})"/> fails, a call