Skip to content

Commit e0b407c

Browse files
committed
Rename switch to match http and remote navigator.
1 parent 69426fd commit e0b407c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Components/Endpoints/src/DependencyInjection/HttpNavigationManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Components.Endpoints;
77

88
internal sealed class HttpNavigationManager : NavigationManager, IHostEnvironmentNavigationManager
99
{
10-
private const string _enableThrowNavigationException = "Microsoft.AspNetCore.Components.Endpoints.HttpNavigationManager.EnableThrowNavigationException";
10+
private const string _enableThrowNavigationException = "Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException";
1111

1212
private static bool _throwNavigationException =>
1313
AppContext.TryGetSwitch(_enableThrowNavigationException, out var switchValue) && switchValue;

src/Components/Server/src/Circuits/RemoteNavigationManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal sealed partial class RemoteNavigationManager : NavigationManager, IHost
1717
private readonly ILogger<RemoteNavigationManager> _logger;
1818
private IJSRuntime _jsRuntime;
1919
private bool? _navigationLockStateBeforeJsRuntimeAttached;
20-
private const string _enableThrowNavigationException = "Microsoft.AspNetCore.Components.Endpoints.HttpNavigationManager.EnableThrowNavigationException";
20+
private const string _enableThrowNavigationException = "Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException";
2121
private static bool _throwNavigationException =>
2222
AppContext.TryGetSwitch(_enableThrowNavigationException, out var switchValue) && switchValue;
2323
private Func<string, Task>? _onNavigateTo;

src/Components/test/E2ETest/ServerRenderingTests/InteractivityTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ public void CanPersistMultiplePrerenderedStateDeclaratively_Auto_PersistsOnWebAs
14051405
[InlineData(false)]
14061406
public void NavigatesWithInteractivityByRequestRedirection(bool controlFlowByException)
14071407
{
1408-
AppContext.SetSwitch("Microsoft.AspNetCore.Components.Endpoints.EnableThrowNavigationException", isEnabled: controlFlowByException);
1408+
AppContext.SetSwitch("Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException", isEnabled: controlFlowByException);
14091409
Navigate($"{ServerPathBase}/routing/ssr-navigate-to");
14101410
Browser.Equal("Click submit to navigate to home", () => Browser.Exists(By.Id("test-info")).Text);
14111411
Browser.Click(By.Id("redirectButton"));

src/Components/test/E2ETest/ServerRenderingTests/NoInteractivityTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void CanUseServerAuthenticationStateByDefault()
7171
[InlineData(false, true)]
7272
public void NavigatesWithoutInteractivityByRequestRedirection(bool controlFlowByException, bool isStreaming)
7373
{
74-
AppContext.SetSwitch("Microsoft.AspNetCore.Components.Endpoints.EnableThrowNavigationException", isEnabled: controlFlowByException);
74+
AppContext.SetSwitch("Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException", isEnabled: controlFlowByException);
7575
string streaming = isStreaming ? $"streaming-" : "";
7676
Navigate($"{ServerPathBase}/routing/ssr-{streaming}navigate-to");
7777
Browser.Equal("Click submit to navigate to home", () => Browser.Exists(By.Id("test-info")).Text);

0 commit comments

Comments
 (0)