60 instantiations of PathString
Aspire.Hosting.Yarp (4)
ConfigurationBuilder\Transforms\PathTransformExtensions.cs (4)
45return route.WithTransformPathSet(new PathString(path)); 77return route.WithTransformPathPrefix(new PathString(prefix)); 109return route.WithTransformPathRemovePrefix(new PathString(prefix)); 141return route.WithTransformPathRouteValues(new PathString(pattern));
Microsoft.AspNetCore.Authentication.Cookies (3)
CookieAuthenticationDefaults.cs (3)
27public static readonly PathString LoginPath = new PathString("/Account/Login"); 33public static readonly PathString LogoutPath = new PathString("/Account/Logout"); 39public static readonly PathString AccessDeniedPath = new PathString("/Account/AccessDenied");
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookOptions.cs (1)
20CallbackPath = new PathString("/signin-facebook");
Microsoft.AspNetCore.Authentication.Google (1)
GoogleOptions.cs (1)
20CallbackPath = new PathString("/signin-google");
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountOptions.cs (1)
20CallbackPath = new PathString("/signin-microsoft");
Microsoft.AspNetCore.Authentication.OpenIdConnect (7)
OpenIdConnectConfigureOptions.cs (4)
43options.AccessDeniedPath = new PathString(configSection[nameof(options.AccessDeniedPath)] ?? options.AccessDeniedPath.Value); 47options.CallbackPath = new PathString(configSection[nameof(options.CallbackPath)] ?? options.CallbackPath.Value); 68options.RemoteSignOutPath = new PathString(configSection[nameof(options.RemoteSignOutPath)] ?? options.RemoteSignOutPath.Value); 76options.SignedOutCallbackPath = new PathString(configSection[nameof(options.SignedOutCallbackPath)] ?? options.SignedOutCallbackPath.Value);
OpenIdConnectOptions.cs (3)
44CallbackPath = new PathString("/signin-oidc"); 45SignedOutCallbackPath = new PathString("/signout-callback-oidc"); 46RemoteSignOutPath = new PathString("/signout-oidc");
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterOptions.cs (1)
24CallbackPath = new PathString("/signin-twitter");
Microsoft.AspNetCore.Diagnostics (4)
ExceptionHandler\ExceptionHandlerExtensions.cs (2)
46ExceptionHandlingPath = new PathString(errorHandlingPath) 64ExceptionHandlingPath = new PathString(errorHandlingPath),
StatusCodePage\StatusCodePagesExtensions.cs (1)
221var newPath = new PathString(
WelcomePage\WelcomePageExtensions.cs (1)
57Path = new PathString(path)
Microsoft.AspNetCore.Http (2)
Internal\DefaultHttpRequest.cs (2)
69get { return new PathString(HttpRequestFeature.PathBase); } 75get { return new PathString(HttpRequestFeature.Path); }
Microsoft.AspNetCore.Http.Abstractions (11)
Extensions\UsePathBaseExtensions.cs (1)
26pathBase = new PathString(pathBase.Value?.TrimEnd('/'));
PathString.cs (10)
30public static readonly PathString Empty = new(string.Empty); 185return new PathString(uriComponent); 191return new PathString(pathBuffer.ToString()); 207return new PathString(pathBuffer.ToString()); 290remaining = new PathString(value1[value2.Length..]); 340matched = new PathString(value1.Substring(0, value2.Length)); 341remaining = new PathString(value1[value2.Length..]); 363return new PathString(combined); 366return new PathString(Value + other.Value); 509=> string.IsNullOrEmpty(s) ? new PathString(s) : FromUriComponent(s);
Microsoft.AspNetCore.Http.Extensions (5)
UriHelper.cs (5)
30PathString pathBase = new PathString(), 31PathString path = new PathString(), 53PathString pathBase = new PathString(), 54PathString path = new PathString(), 114path = new PathString();
Microsoft.AspNetCore.Http.Results (1)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
22var segment = new PathString(contentPath.Substring(1));
Microsoft.AspNetCore.Identity (2)
IdentityCookiesBuilderExtensions.cs (1)
51o.LoginPath = new PathString("/Account/Login");
IdentityServiceCollectionExtensions.cs (1)
61o.LoginPath = new PathString("/Account/Login");
Microsoft.AspNetCore.Mvc.Core (2)
Routing\UrlHelperBase.cs (1)
304var segment = new PathString(contentPath.Substring(1));
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
22var segment = new PathString(contentPath.Substring(1));
Microsoft.AspNetCore.Mvc.TagHelpers (1)
GlobbingUrlBuilder.cs (1)
159var relativePath = new PathString("/" + matchedPath.Path);
Microsoft.AspNetCore.Routing (1)
UriBuildingContext.cs (1)
258pathString = new PathString(_path.ToString());
Microsoft.AspNetCore.Server.HttpSys (2)
UrlPrefixCollection.cs (2)
84var originalPathString = new PathString(originalPath); 96&& originalPathString.StartsWithSegments(new PathString(prefix.PathWithoutTrailingSlash), StringComparison.OrdinalIgnoreCase, out var remainder)
Microsoft.AspNetCore.Server.IISIntegration (2)
IISMiddleware.cs (1)
28private static readonly PathString ANCMRequestPath = new PathString("/iisintegration");
WebHostBuilderIISExtensions.cs (1)
91services.AddSingleton<IStartupFilter>(new IISSetupFilter(pairingToken, new PathString(path), isWebSocketsSupported));
Microsoft.AspNetCore.StaticFiles (6)
DefaultFilesExtensions.cs (1)
48RequestPath = new PathString(requestPath)
DefaultFilesMiddleware.cs (1)
75context.Request.Path = new PathString(Helpers.GetPathValueWithSlash(context.Request.Path) + defaultFile);
DirectoryBrowserExtensions.cs (1)
48RequestPath = new PathString(requestPath)
FileServerExtensions.cs (1)
68RequestPath = new PathString(requestPath)
Helpers.cs (1)
55path += new PathString("/");
StaticFileExtensions.cs (1)
48RequestPath = new PathString(requestPath)
Microsoft.AspNetCore.TestHost (3)
ClientHandler.cs (1)
40pathBase = new PathString(pathBase.Value[..^1]); // All but the last character
TestServer.cs (1)
230pathBase = new PathString(pathBase.Value[..^1]); // All but the last character.
WebSocketClient.cs (1)
29pathBase = new PathString(pathBase.Value[..^1]); // All but the last character.
307 references to PathString
Aspire.Hosting.Yarp (4)
ConfigurationBuilder\Transforms\PathTransformExtensions.cs (4)
21public static YarpRoute WithTransformPathSet(this YarpRoute route, PathString path) 53public static YarpRoute WithTransformPathPrefix(this YarpRoute route, PathString prefix) 85public static YarpRoute WithTransformPathRemovePrefix(this YarpRoute route, PathString prefix) 117public static YarpRoute WithTransformPathRouteValues(this YarpRoute route, [StringSyntax("Route")] PathString pattern)
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?> __RequestDeniedCallback = 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, "CsrfRequestDenied"), "Cross-origin CSRF protection denied request {Method} {Path} from origin '{Origin}'.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true }); 17private static partial void RequestDenied(global::Microsoft.Extensions.Logging.ILogger logger, string method, global::Microsoft.AspNetCore.Http.PathString path, string origin)
Internal\CsrfProtectionMiddleware.cs (1)
52private static partial void RequestDenied(ILogger logger, string method, PathString path, string origin);
Microsoft.AspNetCore.Authentication (6)
AuthenticationHandler.cs (2)
54protected PathString OriginalPath => Context.Features.Get<IAuthenticationFeature>()?.OriginalPath ?? Request.Path; 59protected PathString OriginalPathBase => Context.Features.Get<IAuthenticationFeature>()?.OriginalPathBase ?? Request.PathBase;
Events\AccessDeniedContext.cs (1)
31public PathString AccessDeniedPath { get; set; }
RemoteAuthenticationOptions.cs (2)
88public PathString CallbackPath { get; set; } 96public PathString AccessDeniedPath { get; set; }
RequestPathBaseCookieBuilder.cs (1)
28var originalPathBase = context.Features.Get<IAuthenticationFeature>()?.OriginalPathBase ?? context.Request.PathBase;
Microsoft.AspNetCore.Authentication.Abstractions (2)
IAuthenticationFeature.cs (2)
16PathString OriginalPathBase { get; set; } 21PathString OriginalPath { get; set; }
Microsoft.AspNetCore.Authentication.Cookies (6)
CookieAuthenticationDefaults.cs (3)
27public static readonly PathString LoginPath = new PathString("/Account/Login"); 33public static readonly PathString LogoutPath = new PathString("/Account/Logout"); 39public static readonly PathString AccessDeniedPath = new PathString("/Account/AccessDenied");
CookieAuthenticationOptions.cs (3)
75public PathString LoginPath { get; set; } 80public PathString LogoutPath { get; set; } 85public PathString AccessDeniedPath { get; set; }
Microsoft.AspNetCore.Authentication.Core (2)
AuthenticationFeature.cs (2)
16public PathString OriginalPathBase { get; set; } 21public PathString OriginalPath { get; set; }
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectOptions.cs (2)
194public PathString SignedOutCallbackPath { get; set; } 252public PathString RemoteSignOutPath { get; set; }
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationOptions.cs (1)
189public PathString RemoteSignOutPath { get; set; }
WsFederationPostConfigureOptions.cs (1)
55options.CallbackPath = PathString.FromUriComponent(wreply);
Microsoft.AspNetCore.Components.Server (1)
ComponentHub.cs (1)
72public static PathString DefaultPath { get; } = "/_blazor";
Microsoft.AspNetCore.Components.WebAssembly.Server (6)
Builder\WebAssemblyComponentsEndpointOptions.cs (2)
14/// Gets or sets the <see cref="PathString"/> that indicates the prefix for Blazor WebAssembly assets. 17public PathString PathPrefix { get; set; }
ComponentsWebAssemblyApplicationBuilderExtensions.cs (4)
32/// <param name="pathPrefix">The <see cref="Microsoft.AspNetCore.Http.PathString"/> that indicates the prefix for the Blazor WebAssembly application.</param> 34public static IApplicationBuilder UseBlazorFrameworkFiles(this IApplicationBuilder builder, PathString pathPrefix) 42builder.MapWhen(ctx => ctx.Request.Path.StartsWithSegments(pathPrefix, out var rest) && rest.StartsWithSegments("/_framework") && 109var requestPath = fileContext.Context.Request.Path;
Microsoft.AspNetCore.Diagnostics (6)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
140var originalPath = context.Request.Path;
ExceptionHandler\ExceptionHandlerOptions.cs (1)
20public PathString ExceptionHandlingPath { get; set; }
StatusCodePage\StatusCodePagesExtensions.cs (2)
221var newPath = new PathString( 227var originalPath = context.HttpContext.Request.Path;
WelcomePage\WelcomePageExtensions.cs (1)
35public static IApplicationBuilder UseWelcomePage(this IApplicationBuilder app, PathString path)
WelcomePage\WelcomePageOptions.cs (1)
16public PathString Path { get; set; }
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)
Internal\HostingApplicationDiagnostics.cs (1)
566[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(PathString))]
Microsoft.AspNetCore.Http (2)
Internal\DefaultHttpRequest.cs (2)
67public override PathString PathBase 73public override PathString Path
Microsoft.AspNetCore.Http.Abstractions (97)
Extensions\MapExtensions.cs (2)
35public static IApplicationBuilder Map(this IApplicationBuilder app, PathString pathMatch, Action<IApplicationBuilder> configuration) 49public static IApplicationBuilder Map(this IApplicationBuilder app, PathString pathMatch, bool preserveMatchedPathSegment, Action<IApplicationBuilder> configuration)
Extensions\MapMiddleware.cs (6)
44if (context.Request.Path.StartsWithSegments(_options.PathMatch, out var matchedPath, out var remainingPath)) 55private async Task InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath) 57var path = context.Request.Path; 58var pathBase = context.Request.PathBase;
Extensions\MapOptions.cs (1)
16public PathString PathMatch { get; set; }
Extensions\UsePathBaseExtensions.cs (1)
21public static IApplicationBuilder UsePathBase(this IApplicationBuilder app, PathString pathBase)
Extensions\UsePathBaseMiddleware.cs (8)
14private readonly PathString _pathBase; 21public UsePathBaseMiddleware(RequestDelegate next, PathString pathBase) 43if (context.Request.Path.StartsWithSegments(_pathBase, out var matchedPath, out var remainingPath)) 50private async Task InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath) 52var originalPath = context.Request.Path; 53var originalPathBase = context.Request.PathBase;
HttpRequest.cs (5)
52public abstract PathString PathBase { get; set; } 57/// The value may be <see cref="PathString.Empty"/> if <see cref="PathBase"/> contains the full path, 63public abstract PathString Path { get; set; } 168public PathString PathBase => _request.PathBase; 169public PathString Path => _request.Path;
PathString.cs (74)
20public readonly struct PathString : IEquatable<PathString> 30public static readonly PathString Empty = new(string.Empty); 180public static PathString FromUriComponent(string uriComponent) 199public static PathString FromUriComponent(Uri uri) 211/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/>. 213/// <param name="other">The <see cref="PathString"/> to compare.</param> 216/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked 217/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b", 219/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/". 221public bool StartsWithSegments(PathString other) 227/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> when compared 230/// <param name="other">The <see cref="PathString"/> to compare.</param> 231/// <param name="comparisonType">One of the enumeration values that determines how this <see cref="PathString"/> and value are compared.</param> 234/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked 235/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b", 237/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/". 239public bool StartsWithSegments(PathString other, StringComparison comparisonType) 251/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> and returns 254/// <param name="other">The <see cref="PathString"/> to compare.</param> 258/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked 259/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b", 261/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/". 263public bool StartsWithSegments(PathString other, out PathString remaining) 269/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> when compared 272/// <param name="other">The <see cref="PathString"/> to compare.</param> 273/// <param name="comparisonType">One of the enumeration values that determines how this <see cref="PathString"/> and value are compared.</param> 277/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked 278/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b", 280/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/". 282public bool StartsWithSegments(PathString other, StringComparison comparisonType, out PathString remaining) 299/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> and returns 302/// <param name="other">The <see cref="PathString"/> to compare.</param> 307/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked 308/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b", 310/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/". 312public bool StartsWithSegments(PathString other, out PathString matched, out PathString remaining) 318/// Determines whether the beginning of this <see cref="PathString"/> instance matches the specified <see cref="PathString"/> when compared 321/// <param name="other">The <see cref="PathString"/> to compare.</param> 322/// <param name="comparisonType">One of the enumeration values that determines how this <see cref="PathString"/> and value are compared.</param> 327/// When the <paramref name="other"/> parameter contains a trailing slash, the <see cref="PathString"/> being checked 328/// must either exactly match or include a trailing slash. For instance, for a <see cref="PathString"/> of "/a/b", 330/// Whereas, a <see cref="PathString"/> of "/a//b/" will return <c>true</c> when compared with "/a/". 332public bool StartsWithSegments(PathString other, StringComparison comparisonType, out PathString matched, out PathString remaining) 354public PathString Add(PathString other) 383public bool Equals(PathString other) 394public bool Equals(PathString other, StringComparison comparisonType) 414return obj is PathString pathString && Equals(pathString); 432public static bool operator ==(PathString left, PathString right) 443public static bool operator !=(PathString left, PathString right) 453public static string operator +(string left, PathString right) 465public static string operator +(PathString left, string? right) 478public static PathString operator +(PathString left, PathString right) 489public static string operator +(PathString left, QueryString right) 498public static implicit operator PathString(string? s) 505public static implicit operator string(PathString path) 508internal static PathString ConvertFromString(string? s) 519? 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)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (3)
22var segment = new PathString(contentPath.Substring(1)); 23var applicationPath = httpContext.Request.PathBase; 25var path = applicationPath.Add(segment);
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
383request.PathBase = PathString.FromUriComponent(currentValues.Prefix);
Microsoft.AspNetCore.Mvc.Core (17)
Routing\ControllerLinkGeneratorExtensions.cs (4)
46PathString? pathBase = default, 84PathString pathBase = default, 142PathString? pathBase = default, 194PathString pathBase = default,
Routing\PageLinkGeneratorExtensions.cs (4)
45PathString? pathBase = default, 87PathString pathBase = default, 143PathString? pathBase = default, 195PathString pathBase = default,
Routing\UrlHelperBase.cs (6)
131var pathBase = ActionContext.HttpContext.Request.PathBase; 304var segment = new PathString(contentPath.Substring(1)); 305var applicationPath = httpContext.Request.PathBase; 307var path = applicationPath.Add(segment); 415internal static void AppendPathAndFragment(StringBuilder builder, PathString pathBase, string virtualPath, string? fragment) 470var pathBase = ActionContext.HttpContext.Request.PathBase;
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (3)
22var segment = new PathString(contentPath.Substring(1)); 23var applicationPath = httpContext.Request.PathBase; 25var path = applicationPath.Add(segment);
Microsoft.AspNetCore.Mvc.Razor (1)
Infrastructure\DefaultFileVersionProvider.cs (1)
36public string AddFileVersionToPath(PathString requestPathBase, string path)
Microsoft.AspNetCore.Mvc.TagHelpers (7)
GlobbingUrlBuilder.cs (3)
33public GlobbingUrlBuilder(IFileProvider fileProvider, IMemoryCache cache, PathString requestPathBase) 57public PathString RequestPathBase { get; } 159var relativePath = new PathString("/" + matchedPath.Path);
ImageTagHelper.cs (1)
144var pathBase = ViewContext.HttpContext.Request.PathBase;
LinkTagHelper.cs (1)
536var pathBase = ViewContext.HttpContext.Request.PathBase;
ResourceCollectionUtilities.cs (1)
14var pathBase = viewContext.HttpContext.Request.PathBase;
ScriptTagHelper.cs (1)
430var pathBase = ViewContext.HttpContext.Request.PathBase;
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
IFileVersionProvider.cs (1)
19string AddFileVersionToPath(PathString requestPathBase, string path);
Microsoft.AspNetCore.Rewrite (18)
IISUrlRewrite\IISUrlRewriteRule.cs (2)
42var path = context.HttpContext.Request.Path; 44if (path == PathString.Empty)
RedirectRule.cs (2)
30var path = request.Path; 31var pathBase = request.PathBase;
RewriteMiddleware.cs (1)
64var originalPath = context.Request.Path;
RewriteRule.cs (7)
29var path = context.HttpContext.Request.Path; 31if (path == PathString.Empty) 59PathString pathString; 76request.Path = PathString.FromUriComponent(newPath); 80request.Path = PathString.FromUriComponent('/' + newPath); 90request.Path = PathString.FromUriComponent(result); 94request.Path = PathString.FromUriComponent('/' + result);
UrlActions\RedirectAction.cs (1)
33var pathBase = context.HttpContext.Request.PathBase;
UrlActions\RewriteAction.cs (5)
66PathString path; 98request.Path = PathString.FromUriComponent(path); 102request.Path = PathString.FromUriComponent('/' + path); 121request.Path = PathString.FromUriComponent(pattern); 125request.Path = PathString.FromUriComponent('/' + pattern);
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)
DefaultLinkParser.cs (4)
48public override RouteValueDictionary? ParsePathByAddress<TAddress>(TAddress address, PathString path) 119internal bool TryParse(RouteEndpoint endpoint, PathString path, [NotNullWhen(true)] out RouteValueDictionary? values) 187public static void PathParsingSucceeded(ILogger logger, PathString path, Endpoint endpoint) 199public static void PathParsingFailed(ILogger logger, PathString path, IEnumerable<Endpoint> endpoints)
LinkGeneratorEndpointNameAddressExtensions.cs (8)
37PathString? pathBase = default, 77PathString? pathBase = default, 113PathString pathBase = default, 141PathString pathBase = default, 190PathString? pathBase = default, 249PathString? pathBase = default, 302PathString pathBase = default, 351PathString pathBase = default,
LinkGeneratorRouteValuesAddressExtensions.cs (8)
37PathString? pathBase = default, 77PathString? pathBase = default, 113PathString pathBase = default, 141PathString pathBase = default, 190PathString? pathBase = default, 249PathString? pathBase = default, 302PathString pathBase = default, 345PathString pathBase = default,
LinkParser.cs (2)
26/// <see cref="ParsePathByAddress{TAddress}(TAddress, PathString)"/> will attempt to first resolve 35public abstract RouteValueDictionary? ParsePathByAddress<TAddress>(TAddress address, PathString path);
LinkParserEndpointNameAddressExtensions.cs (2)
26/// <see cref="ParsePathByEndpointName(LinkParser, string, PathString)"/> will attempt to first resolve 38PathString path)
PathTokenizer.cs (1)
22public PathTokenizer(PathString path)
Patterns\RoutePatternMatcher.cs (1)
63public bool TryMatch(PathString path, RouteValueDictionary values)
RouteBase.cs (1)
113var requestPath = context.HttpContext.Request.Path;
Template\TemplateBinder.cs (1)
474out (PathString path, QueryString query) result)
Template\TemplateMatcher.cs (2)
78/// <param name="path">A <see cref="PathString"/> representing the route to match.</param> 81public bool TryMatch(PathString path, RouteValueDictionary values)
UriBuildingContext.cs (3)
241public PathString ToPathString() 243PathString pathString; 262pathString = PathString.Empty;
Microsoft.AspNetCore.Routing.Abstractions (4)
LinkGenerator.cs (4)
51PathString? pathBase = default, 72PathString pathBase = default, 116PathString? pathBase = default, 152PathString pathBase = default,
Microsoft.AspNetCore.Server.HttpSys (2)
UrlPrefixCollection.cs (2)
84var originalPathString = new PathString(originalPath); 96&& originalPathString.StartsWithSegments(new PathString(prefix.PathWithoutTrailingSlash), StringComparison.OrdinalIgnoreCase, out var remainder)
Microsoft.AspNetCore.Server.IISIntegration (3)
IISMiddleware.cs (1)
28private static readonly PathString ANCMRequestPath = new PathString("/iisintegration");
IISSetupFilter.cs (2)
13private readonly PathString _pathBase; 16internal IISSetupFilter(string pairingToken, PathString pathBase, bool isWebsocketsSupported)
Microsoft.AspNetCore.SpaServices.Extensions (2)
SpaOptions.cs (2)
15private PathString _defaultPage = "/index.html"; 42public PathString DefaultPage
Microsoft.AspNetCore.StaticFiles (23)
DefaultFilesMiddleware.cs (2)
20private readonly PathString _matchUrl; 53&& Helpers.TryMatchPath(context, _matchUrl, forDirectory: true, subpath: out var subpath))
DirectoryBrowserMiddleware.cs (3)
19private readonly PathString _matchUrl; 66&& Helpers.TryMatchPath(context, _matchUrl, forDirectory: true, subpath: out var subpath) 83private bool TryGetDirectoryInfo(PathString subpath, out IDirectoryContents contents)
Helpers.cs (5)
27internal static bool PathEndsInSlash(PathString path) 32internal static string GetPathValueWithSlash(PathString path) 49internal static bool TryMatchPath(HttpContext context, PathString matchUrl, bool forDirectory, out PathString subpath) 51var path = context.Request.Path;
HtmlDirectoryFormatter.cs (1)
48PathString requestPath = context.Request.PathBase + context.Request.Path;
Infrastructure\SharedOptions.cs (3)
14private PathString _requestPath; 21RequestPath = PathString.Empty; 27public PathString RequestPath
Infrastructure\SharedOptionsBase.cs (1)
35public PathString RequestPath
StaticFileContext.cs (2)
34private readonly PathString _subPath; 44public StaticFileContext(HttpContext context, StaticFileOptions options, ILogger logger, IFileProvider fileProvider, string? contentType, PathString subPath)
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)
ClientHandler.cs (5)
24private readonly PathString _pathBase; 32internal ClientHandler(PathString pathBase, ApplicationWrapper application, Action<HttpContext>? additionalContextConfiguration = null) 180req.Path = PathString.FromUriComponent(request.RequestUri); 181req.PathBase = PathString.Empty; 182if (req.Path.StartsWithSegments(_pathBase, out var remainder))
TestServer.cs (8)
152private PathString PathBase => BaseAddress == null ? PathString.Empty : PathString.FromUriComponent(BaseAddress); 195var pathBase = BaseAddress == null ? PathString.Empty : PathString.FromUriComponent(BaseAddress); 227var pathBase = PathString.FromUriComponent(BaseAddress);
WebSocketClient.cs (5)
20private readonly PathString _pathBase; 22internal WebSocketClient(PathString pathBase, ApplicationWrapper application) 71request.Path = PathString.FromUriComponent(uri); 72request.PathBase = PathString.Empty; 73if (request.Path.StartsWithSegments(_pathBase, out var remainder))
Microsoft.AspNetCore.Watch.BrowserRefresh (8)
src\sdk\src\Dotnet.Watch\Web.Middleware\ApplicationPaths.cs (5)
16public static PathString FrameworkRoot { get; } = "/_framework"; 22public static PathString ClearSiteData { get; } = FrameworkRoot + "/clear-browser-cache"; 28public static PathString BrowserRefreshJS { get; } = FrameworkRoot + "/aspnetcore-browser-refresh.js"; 34public static PathString BlazorHotReloadMiddleware { get; } = FrameworkRoot + "/blazor-hotreload"; 41public static PathString BlazorHotReloadJS { get; } = FrameworkRoot + "/blazor-hotreload.js";
src\sdk\src\Dotnet.Watch\Web.Middleware\BrowserScriptMiddleware.cs (2)
22private readonly PathString _scriptPath; 27public BrowserScriptMiddleware(RequestDelegate next, PathString scriptPath, ReadOnlyMemory<byte> scriptBytes, ILogger<BrowserScriptMiddleware> logger)
src\sdk\src\Dotnet.Watch\Web.Middleware\HostingStartup.cs (1)
31var path = context.Request.Path;