1 write to Value
Microsoft.AspNetCore.Http.Abstractions (1)
PathString.cs (1)
43Value = value;
104 references to Value
Aspire.Hosting.Yarp (4)
ConfigurationBuilder\Transforms\PathTransformExtensions.cs (4)
23if (path.Value is null) 55if (prefix.Value is null) 87if (prefix.Value is null) 119if (pattern.Value is null)
Microsoft.AspNetCore.Authentication.OpenIdConnect (4)
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);
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (2)
110var fileExtension = Path.GetExtension(requestPath.Value); 120var originalPath = Path.GetFileNameWithoutExtension(requestPath.Value);
Microsoft.AspNetCore.Diagnostics (4)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (2)
158Path = originalPath.Value!, 194handlerTag = _options.ExceptionHandlingPath.Value;
StatusCodePage\StatusCodePagesExtensions.cs (2)
239OriginalPathBase = context.HttpContext.Request.PathBase.Value!, 240OriginalPath = originalPath.Value!,
Microsoft.AspNetCore.Diagnostics.Middleware (2)
Logging\HttpLoggingRedactionInterceptor.cs (2)
70if (_excludePathStartsWith.Length != 0 && ShouldExcludePath(context.Request.Path.Value!)) 127path = request.Path.Value!;
Microsoft.AspNetCore.Hosting (8)
Internal\HostingRequestFinishedLog.cs (4)
438 => new KeyValuePair<string, object?>(nameof(request.PathBase), request.PathBase.Value), 449 => new KeyValuePair<string, object?>(nameof(request.Path), request.Path.Value), 66_cachedToString = $"Request finished {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {response.StatusCode.ToString(CultureInfo.InvariantCulture)} {ValueOrEmptyMarker(response.ContentLength)} {EscapedValueOrEmptyMarker(response.ContentType)} {Elapsed.TotalMilliseconds.ToString("0.0000", CultureInfo.InvariantCulture)}ms";
Internal\HostingRequestStartingLog.cs (4)
316 => new KeyValuePair<string, object?>(nameof(_request.PathBase), _request.PathBase.Value), 327 => new KeyValuePair<string, object?>(nameof(_request.Path), _request.Path.Value), 48_cachedToString = $"Request starting {request.Protocol} {request.Method} {request.Scheme}://{request.Host.Value}{request.PathBase.Value}{request.Path.Value}{request.QueryString.Value} - {EscapedValueOrEmptyMarker(request.ContentType)} {ValueOrEmptyMarker(request.ContentLength)}";
Microsoft.AspNetCore.Http (4)
Internal\DefaultHttpRequest.cs (2)
70set { HttpRequestFeature.PathBase = value.Value ?? string.Empty; } 76set { HttpRequestFeature.Path = value.Value ?? string.Empty; }
src\aspnetcore\src\Shared\Debugger\HttpContextDebugFormatter.cs (2)
114sb.Append(CultureInfo.InvariantCulture, $"{scheme}://{host}{request.PathBase.Value}{request.Path.Value}{(includeQueryString ? request.QueryString.Value : string.Empty)}");
Microsoft.AspNetCore.Http.Abstractions (21)
Extensions\MapExtensions.cs (1)
54if (pathMatch.HasValue && pathMatch.Value!.EndsWith('/'))
Extensions\UsePathBaseExtensions.cs (1)
26pathBase = new PathString(pathBase.Value?.TrimEnd('/'));
PathString.cs (17)
54[MemberNotNullWhen(true, nameof(Value))] 57get { return !string.IsNullOrEmpty(Value); } 75var value = Value; 241var value1 = Value ?? string.Empty; 242var value2 = other.Value ?? string.Empty; 284var value1 = Value ?? string.Empty; 285var value2 = other.Value ?? string.Empty; 334var value1 = Value ?? string.Empty; 335var value2 = other.Value ?? string.Empty; 358Value[^1] == '/') 362var combined = string.Concat(Value.AsSpan(), other.Value.AsSpan(1)); 366return new PathString(Value + other.Value); 400return string.Equals(Value, other.Value, comparisonType); 423return (HasValue ? StringComparer.OrdinalIgnoreCase.GetHashCode(Value) : 0);
src\aspnetcore\src\Shared\Debugger\HttpContextDebugFormatter.cs (2)
114sb.Append(CultureInfo.InvariantCulture, $"{scheme}://{host}{request.PathBase.Value}{request.Path.Value}{(includeQueryString ? request.QueryString.Value : string.Empty)}");
Microsoft.AspNetCore.Http.Extensions (2)
UriHelper.cs (2)
206return string.Concat([request.Scheme, SchemeDelimiter, request.Host.Value, request.PathBase.Value, request.Path.Value, request.QueryString.Value]);
Microsoft.AspNetCore.Http.Results (1)
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
27return path.Value;
Microsoft.AspNetCore.Mvc.Core (5)
Routing\UrlHelperBase.cs (4)
309return path.Value; 437builder.Append(pathBase.Value); 441builder.Append(pathBase.Value); 443if (pathBase.Value.EndsWith('/'))
src\aspnetcore\src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
27return path.Value;
Microsoft.AspNetCore.Mvc.Razor (2)
Infrastructure\DefaultFileVersionProvider.cs (2)
65resolvedPath.StartsWith(requestPathBase.Value, StringComparison.OrdinalIgnoreCase)) 67var requestPathBaseRelativePath = resolvedPath.Substring(requestPathBase.Value.Length);
Microsoft.AspNetCore.Mvc.TagHelpers (4)
ResourceCollectionUtilities.cs (4)
34var length = pathBase.Value.EndsWith('/') ? pathBase.Value.Length : pathBase.Value.Length + 1; 45if (pathBase.Value.EndsWith('/'))
Microsoft.AspNetCore.OutputCaching (6)
OutputCacheKeyProvider.cs (6)
98if (ContainsDelimiters(request.PathBase.Value) || 99ContainsDelimiters(request.Path.Value)) 123.Append(request.PathBase.Value) 124.Append(request.Path.Value); 129.AppendUpperInvariant(request.PathBase.Value) 130.AppendUpperInvariant(request.Path.Value);
Microsoft.AspNetCore.ResponseCaching (6)
ResponseCachingKeyProvider.cs (6)
43ThrowIfContainsDelimiters(request.PathBase.Value); 44ThrowIfContainsDelimiters(request.Path.Value); 60.Append(request.PathBase.Value) 61.Append(request.Path.Value); 66.AppendUpperInvariant(request.PathBase.Value) 67.AppendUpperInvariant(request.Path.Value);
Microsoft.AspNetCore.Rewrite (2)
RedirectRule.cs (1)
55encodedPath = pathBase.HasValue ? pathBase.Value : "/";
UrlActions\RedirectAction.cs (1)
42response.Headers.Location = pathBase.HasValue ? pathBase.Value : "/";
Microsoft.AspNetCore.Routing (5)
DefaultLinkGenerator.cs (1)
355=> TemplateSucceeded(logger, endpoint.RoutePattern.RawText, endpoint.DisplayName, path.Value, query.Value);
DefaultLinkParser.cs (2)
192PathParsingSucceeded(logger, endpoint.DisplayName, path.Value); 204PathParsingFailed(logger, endpoints.Select(e => e.DisplayName), path.Value);
Matching\DfaMatcher.cs (1)
42var path = httpContext.Request.Path.Value!;
PathTokenizer.cs (1)
24_path = path.Value;
Microsoft.AspNetCore.Server.HttpSys (2)
UrlPrefixCollection.cs (2)
97&& (!found || remainder.Value!.Length < remainingPath!.Length)) // Longest match 101remainingPath = remainder.Value;
Microsoft.AspNetCore.SpaServices.Extensions (1)
SpaOptions.cs (1)
47ArgumentException.ThrowIfNullOrEmpty(value.Value);
Microsoft.AspNetCore.StaticFiles (12)
DefaultFilesMiddleware.cs (2)
56var dirContents = _fileProvider.GetDirectoryContents(subpath.Value!); 63var file = _fileProvider.GetFileInfo(subpath.Value + defaultFile);
DirectoryBrowserMiddleware.cs (1)
86contents = _fileProvider.GetDirectoryContents(subpath.Value!);
Helpers.cs (3)
29return path.HasValue && path.Value!.EndsWith("/", StringComparison.Ordinal); 36return path.Value + "/"; 38return path.Value!;
HtmlDirectoryFormatter.cs (2)
61<title>{0} {1}</title>", HtmlEncode(Resources.HtmlDir_IndexOf), HtmlEncode(requestPath.Value!)); 106foreach (var segment in requestPath.Value!.Split('/', StringSplitOptions.RemoveEmptyEntries))
Infrastructure\SharedOptions.cs (1)
32if (value.HasValue && value.Value!.EndsWith('/'))
StaticFileContext.cs (2)
46if (subPath.Value == null) 111public string SubPath => _subPath.Value!;
StaticFileMiddleware.cs (1)
97if (contentTypeProvider.TryGetContentType(subPath.Value!, out contentType))
Microsoft.AspNetCore.TestHost (6)
ClientHandler.cs (2)
38if (pathBase.HasValue && pathBase.Value.EndsWith('/')) 40pathBase = new PathString(pathBase.Value[..^1]); // All but the last character
TestServer.cs (2)
228if (pathBase.HasValue && pathBase.Value.EndsWith('/')) 230pathBase = new PathString(pathBase.Value[..^1]); // All but the last character.
WebSocketClient.cs (2)
27if (pathBase.HasValue && pathBase.Value.EndsWith('/')) 29pathBase = new PathString(pathBase.Value[..^1]); // All but the last character.
Microsoft.AspNetCore.Watch.BrowserRefresh (1)
src\sdk\src\Dotnet.Watch\Web.Middleware\BrowserRefreshMiddleware.cs (1)
146!string.Equals(Path.GetFileName(request.Path.Value), "blazor.boot.json", StringComparison.OrdinalIgnoreCase))