Skip to content

Commit 2e272f1

Browse files
committed
Feedback.
1 parent 99b0a99 commit 2e272f1

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/Components/Components/src/NavigationManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public event EventHandler<NotFoundEventArgs> OnNotFound
6161
// The URI. Always represented an absolute URI.
6262
private string? _uri;
6363
private bool _isInitialized;
64-
private readonly NotFoundEventArgs _notFoundEventArgs = new();
6564

6665
/// <summary>
6766
/// Gets or sets the current base URI. The <see cref="BaseUri" /> is always represented as an absolute URI in string form with trailing slash.
@@ -211,7 +210,7 @@ private void NotFoundCore()
211210
}
212211
else
213212
{
214-
_notFound.Invoke(this, _notFoundEventArgs);
213+
_notFound.Invoke(this, new NotFoundEventArgs());
215214
}
216215
}
217216

src/Components/Components/src/Routing/NotFoundEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Components.Routing;
99
public sealed class NotFoundEventArgs : EventArgs
1010
{
1111
/// <summary>
12-
/// Gets the path of NotFoundPage. If the path is set, it indicates that the router has handled the rendering of the NotFound contents.
12+
/// Gets the path of NotFoundPage. If the path is set, it indicates that a subscriber has handled the rendering of the NotFound contents.
1313
/// </summary>
1414
public string? Path { get; set; }
1515
}

src/Components/test/testassets/Components.TestServer/RazorComponents/CustomRouter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ [Inject] private INavigationInterception NavigationInterception
4646

4747
[Inject] private ILoggerFactory LoggerFactory
4848
{
49-
get => throw new InvalidOperationException("This property should only be set via injection.");
49+
get => throw new InvalidOperationException($"{nameof(LoggerFactory)} should only be set via injection.");
5050
set => _logger = value.CreateLogger<CustomRouter>();
5151
}
5252

0 commit comments

Comments
 (0)