63 instantiations of PathString
Aspire.Hosting.Yarp (4)
blazor-gateway (2)
Microsoft.AspNetCore.Authentication.Cookies (4)
Microsoft.AspNetCore.Authentication.Facebook (1)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (7)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Diagnostics (4)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions (11)
Microsoft.AspNetCore.Http.Extensions (5)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.Identity (2)
Microsoft.AspNetCore.Mvc.Core (2)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Routing (1)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IISIntegration (2)
Microsoft.AspNetCore.StaticFiles (6)
Microsoft.AspNetCore.TestHost (3)
326 references to PathString
Aspire.Hosting.Yarp (4)
blazor-gateway (3)
Microsoft.AspNetCore (4)
_generated\0\LoggerMessage.g.cs (3)
9private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, string, global::Microsoft.AspNetCore.Http.PathString, string, global::System.Exception?> __RequestFailedValidationCallback =
10global::Microsoft.Extensions.Logging.LoggerMessage.Define<string, global::Microsoft.AspNetCore.Http.PathString, string>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(1, "CsrfValidationFailed"), "Cross-origin CSRF protection marked request {Method} {Path} from origin '{Origin}' as invalid.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
17private static partial void RequestFailedValidation(global::Microsoft.Extensions.Logging.ILogger logger, string method, global::Microsoft.AspNetCore.Http.PathString path, string origin)
Microsoft.AspNetCore.Authentication (6)
Microsoft.AspNetCore.Authentication.Abstractions (2)
Microsoft.AspNetCore.Authentication.Cookies (9)
Microsoft.AspNetCore.Authentication.Core (2)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.Components.WebAssembly.Server (6)
Microsoft.AspNetCore.Diagnostics (6)
Microsoft.AspNetCore.Diagnostics.HealthChecks (8)
Builder\HealthCheckApplicationBuilderExtensions.cs (8)
34public static IApplicationBuilder UseHealthChecks(this IApplicationBuilder app, PathString path)
57public static IApplicationBuilder UseHealthChecks(this IApplicationBuilder app, PathString path, HealthCheckOptions options)
85public static IApplicationBuilder UseHealthChecks(this IApplicationBuilder app, PathString path, int port)
112public static IApplicationBuilder UseHealthChecks(this IApplicationBuilder app, PathString path, string port)
143public static IApplicationBuilder UseHealthChecks(this IApplicationBuilder app, PathString path, int port, HealthCheckOptions options)
169public static IApplicationBuilder UseHealthChecks(this IApplicationBuilder app, PathString path, string port, HealthCheckOptions options)
191private static void UseHealthChecksCore(IApplicationBuilder app, PathString path, int? port, object[] args)
225(c.Request.Path.StartsWithSegments(path, out var remaining) &&
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions (110)
PathString.cs (87)
20public readonly struct PathString : IEquatable<PathString>
30public static readonly PathString Empty = new(string.Empty);
183public static PathString FromUriComponent(string uriComponent)
202public static PathString FromUriComponent(Uri uri)
214/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/>.
216/// <param name="other">The <see cref="PathString"/> to compare.</param>
219/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked
220/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b",
222/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/".
223/// A backslash ('\') in this <see cref="PathString"/> is treated as equivalent to a forward slash ('/')
224/// for the purpose of segment boundary detection. For example, a <see cref="PathString"/> of "/a\b"
227public bool StartsWithSegments(PathString other)
233/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> when compared
236/// <param name="other">The <see cref="PathString"/> to compare.</param>
237/// <param name="comparisonType">One of the enumeration values that determines how this <see cref="PathString"/> and value are compared.</param>
240/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked
241/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b",
243/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/".
244/// A backslash ('\') in this <see cref="PathString"/> is treated as equivalent to a forward slash ('/')
245/// for the purpose of segment boundary detection. For example, a <see cref="PathString"/> of "/a\b"
248public bool StartsWithSegments(PathString other, StringComparison comparisonType)
260/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> and returns
263/// <param name="other">The <see cref="PathString"/> to compare.</param>
267/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked
268/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b",
270/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/".
271/// A backslash ('\') in this <see cref="PathString"/> is treated as equivalent to a forward slash ('/')
272/// for the purpose of segment boundary detection. For example, a <see cref="PathString"/> of "/a\b"
276public bool StartsWithSegments(PathString other, out PathString remaining)
282/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> when compared
285/// <param name="other">The <see cref="PathString"/> to compare.</param>
286/// <param name="comparisonType">One of the enumeration values that determines how this <see cref="PathString"/> and value are compared.</param>
290/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked
291/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b",
293/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/".
294/// A backslash ('\') in this <see cref="PathString"/> is treated as equivalent to a forward slash ('/')
295/// for the purpose of segment boundary detection. For example, a <see cref="PathString"/> of "/a\b"
299public bool StartsWithSegments(PathString other, StringComparison comparisonType, out PathString remaining)
316/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> and returns
319/// <param name="other">The <see cref="PathString"/> to compare.</param>
324/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked
325/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b",
327/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/".
328/// A backslash ('\') in this <see cref="PathString"/> is treated as equivalent to a forward slash ('/')
329/// for the purpose of segment boundary detection. For example, a <see cref="PathString"/> of "/a\b"
333public bool StartsWithSegments(PathString other, out PathString matched, out PathString remaining)
339/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> when compared
342/// <param name="other">The <see cref="PathString"/> to compare.</param>
343/// <param name="comparisonType">One of the enumeration values that determines how this <see cref="PathString"/> and value are compared.</param>
348/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked
349/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b",
351/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/".
352/// A backslash ('\') in this <see cref="PathString"/> is treated as equivalent to a forward slash ('/')
353/// for the purpose of segment boundary detection. For example, a <see cref="PathString"/> of "/a\b"
357public bool StartsWithSegments(PathString other, StringComparison comparisonType, out PathString matched, out PathString remaining)
380/// If this <see cref="PathString"/> ends with a separator ('/' or '\') and <paramref name="other"/>
385public PathString Add(PathString other)
415public bool Equals(PathString other)
426public bool Equals(PathString other, StringComparison comparisonType)
446return obj is PathString pathString && Equals(pathString);
464public static bool operator ==(PathString left, PathString right)
475public static bool operator !=(PathString left, PathString right)
485public static string operator +(string left, PathString right)
497public static string operator +(PathString left, string? right)
510public static PathString operator +(PathString left, PathString right)
521public static string operator +(PathString left, QueryString right)
530public static implicit operator PathString(string? s)
537public static implicit operator string(PathString path)
540internal static PathString ConvertFromString(string? s)
551? PathString.ConvertFromString(@string)
Microsoft.AspNetCore.Http.Extensions (9)
UriHelper.cs (9)
30PathString pathBase = new PathString(),
31PathString path = new PathString(),
53PathString pathBase = new PathString(),
54PathString path = new PathString(),
108out PathString path,
145path = PathString.FromUriComponent(uri.Substring(searchIndex, limit - searchIndex));
167pathBase: PathString.FromUriComponent(uri),
224/// Initializes the URI <see cref="string"/> for <see cref="BuildAbsolute(string, HostString, PathString, PathString, QueryString, FragmentString)"/>.
Microsoft.AspNetCore.Http.Results (3)
Microsoft.AspNetCore.HttpOverrides (1)
Microsoft.AspNetCore.Mvc.Core (17)
Microsoft.AspNetCore.Mvc.Razor (1)
Microsoft.AspNetCore.Mvc.TagHelpers (7)
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
Microsoft.AspNetCore.Rewrite (18)
Microsoft.AspNetCore.Routing (41)
DefaultLinkGenerator.cs (8)
74PathString? pathBase = default,
99PathString pathBase = default,
126PathString? pathBase = default,
154PathString pathBase = default,
204PathString pathBase,
240PathString pathBase,
286out (PathString path, QueryString query) result)
354public static void TemplateSucceeded(ILogger logger, RouteEndpoint endpoint, PathString path, QueryString query)
Microsoft.AspNetCore.Routing.Abstractions (4)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IISIntegration (3)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.StaticFiles (23)
StaticFileMiddleware.cs (6)
19private readonly PathString _matchUrl;
68else if (!ValidatePath(context, _matchUrl, out var subPath))
93internal static bool ValidatePath(HttpContext context, PathString matchUrl, out PathString subPath) => Helpers.TryMatchPath(context, matchUrl, forDirectory: false, out subPath);
95internal static bool LookupContentType(IContentTypeProvider contentTypeProvider, StaticFileOptions options, PathString subPath, out string? contentType)
111private Task TryServeStaticFile(HttpContext context, string? contentType, PathString subPath)
Microsoft.AspNetCore.TestHost (18)
Microsoft.AspNetCore.Watch.BrowserRefresh (8)