49 references to HasValue
LargeResponseApp (1)
Startup.cs (1)
26if (!path.HasValue || !int.TryParse(path.Value.AsSpan(1), out var numChunks))
Microsoft.AspNetCore.Authentication (2)
RemoteAuthenticationHandler.cs (1)
315if (context.AccessDeniedPath.HasValue)
RemoteAuthenticationOptions.cs (1)
53if (CallbackPath == null || !CallbackPath.HasValue)
Microsoft.AspNetCore.Authentication.Cookies (5)
CookieAuthenticationHandler.cs (2)
374var shouldHonorReturnUrlParameter = Options.LoginPath.HasValue && OriginalPath == Options.LoginPath; 410var shouldHonorReturnUrlParameter = Options.LogoutPath.HasValue && OriginalPath == Options.LogoutPath;
PostConfigureCookieAuthenticationOptions.cs (3)
50if (!options.LoginPath.HasValue) 54if (!options.LogoutPath.HasValue) 58if (!options.AccessDeniedPath.HasValue)
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthOptions.cs (1)
34if (!CallbackPath.HasValue)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (2)
91if (Options.RemoteSignOutPath.HasValue && Options.RemoteSignOutPath == Request.Path) 95else if (Options.SignedOutCallbackPath.HasValue && Options.SignedOutCallbackPath == Request.Path)
OpenIdConnectOptions.cs (1)
102if (!CallbackPath.HasValue)
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (1)
70if (Options.RemoteSignOutPath.HasValue && Options.RemoteSignOutPath == Request.Path && HttpMethods.IsGet(Request.Method)
WsFederationPostConfigureOptions.cs (1)
52if (!options.CallbackPath.HasValue && !string.IsNullOrEmpty(options.Wreply) && Uri.TryCreate(options.Wreply, UriKind.Absolute, out var wreply))
Microsoft.AspNetCore.Diagnostics (2)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
142if (_options.ExceptionHandlingPath.HasValue)
WelcomePage\WelcomePageMiddleware.cs (1)
41if (!_options.Path.HasValue || _options.Path == request.Path)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Builder\HealthCheckApplicationBuilderExtensions.cs (1)
218(!path.HasValue ||
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HttpLoggingRedactionInterceptor.cs (1)
119else if (request.Path.HasValue)
Microsoft.AspNetCore.Hosting (1)
Internal\HostingApplicationDiagnostics.cs (1)
519_path = (httpContext.Request.PathBase.HasValue
Microsoft.AspNetCore.Http (2)
src\Shared\Debugger\HttpContextDebugFormatter.cs (2)
94!request.PathBase.HasValue && 95!request.Path.HasValue &&
Microsoft.AspNetCore.Http.Abstractions (9)
Extensions\MapExtensions.cs (1)
54if (pathMatch.HasValue && pathMatch.Value!.EndsWith('/'))
Extensions\UsePathBaseExtensions.cs (1)
27if (!pathBase.HasValue)
Extensions\UsePathBaseMiddleware.cs (1)
25if (!pathBase.HasValue)
PathString.cs (6)
356if (HasValue && 357other.HasValue && 396if (!HasValue && !other.HasValue) 412return !HasValue; 423return (HasValue ? StringComparer.OrdinalIgnoreCase.GetHashCode(Value) : 0);
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
PathStringTests.cs (1)
70Assert.False(result.HasValue);
Microsoft.AspNetCore.Http.Extensions (2)
UriHelper.cs (2)
36string combinePath = (pathBase.HasValue || path.HasValue) ? (pathBase + path).ToString() : "/";
Microsoft.AspNetCore.Http.Results (1)
src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
26Debug.Assert(path.HasValue);
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
365if (request.PathBase.HasValue)
Microsoft.AspNetCore.Mvc.Core (4)
Routing\UrlHelperBase.cs (3)
308Debug.Assert(path.HasValue); 417if (!pathBase.HasValue) 476&& !pathBase.HasValue)
src\Shared\ResultsHelpers\SharedUrlHelper.cs (1)
26Debug.Assert(path.HasValue);
Microsoft.AspNetCore.Mvc.Razor (1)
Infrastructure\DefaultFileVersionProvider.cs (1)
64requestPathBase.HasValue &&
Microsoft.AspNetCore.Mvc.TagHelpers (1)
ResourceCollectionUtilities.cs (1)
32if (pathBase.HasValue && url.StartsWith(pathBase, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Rewrite (3)
RedirectRule.cs (2)
34if (!path.HasValue) 55encodedPath = pathBase.HasValue ? pathBase.Value : "/";
UrlActions\RedirectAction.cs (1)
42response.Headers.Location = pathBase.HasValue ? pathBase.Value : "/";
Microsoft.AspNetCore.StaticFiles (2)
Helpers.cs (1)
29return path.HasValue && path.Value!.EndsWith("/", StringComparison.Ordinal);
Infrastructure\SharedOptions.cs (1)
32if (value.HasValue && value.Value!.EndsWith('/'))
Microsoft.AspNetCore.TestHost (3)
ClientHandler.cs (1)
38if (pathBase.HasValue && pathBase.Value.EndsWith('/'))
TestServer.cs (1)
222if (pathBase.HasValue && pathBase.Value.EndsWith('/'))
WebSocketClient.cs (1)
27if (pathBase.HasValue && pathBase.Value.EndsWith('/'))