Skip to content

Commit 96f1e6e

Browse files
committed
Feedback - improve trimming.
1 parent 129d180 commit 96f1e6e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using Microsoft.AspNetCore.Components.Routing;
5+
using System.Diagnostics.CodeAnalysis;
56

67
namespace Microsoft.AspNetCore.Components.Endpoints;
78

89
internal sealed class HttpNavigationManager : NavigationManager, IHostEnvironmentNavigationManager
910
{
1011
private const string _enableThrowNavigationException = "Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException";
1112

13+
[FeatureSwitchDefinition("Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException")]
1214
private static bool _throwNavigationException =>
1315
AppContext.TryGetSwitch(_enableThrowNavigationException, out var switchValue) && switchValue;
1416

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ internal sealed partial class RemoteNavigationManager : NavigationManager, IHost
1818
private IJSRuntime _jsRuntime;
1919
private bool? _navigationLockStateBeforeJsRuntimeAttached;
2020
private const string _enableThrowNavigationException = "Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException";
21+
22+
[FeatureSwitchDefinition("Microsoft.AspNetCore.Components.Endpoints.NavigationManager.EnableThrowNavigationException")]
2123
private static bool _throwNavigationException =>
2224
AppContext.TryGetSwitch(_enableThrowNavigationException, out var switchValue) && switchValue;
2325
private Func<string, Task>? _onNavigateTo;

0 commit comments

Comments
 (0)