11 types derived from NavigationManager
Microsoft.AspNetCore.Components.Authorization.Tests (1)
AuthorizeRouteViewTest.cs (1)
427class TestNavigationManager : NavigationManager
Microsoft.AspNetCore.Components.Endpoints (1)
DependencyInjection\HttpNavigationManager.cs (1)
8internal sealed class HttpNavigationManager : NavigationManager, IHostEnvironmentNavigationManager
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentResultTest.cs (1)
511class FakeNavigationManager : NavigationManager, IHostEnvironmentNavigationManager
Microsoft.AspNetCore.Components.Server (1)
Circuits\RemoteNavigationManager.cs (1)
15internal sealed partial class RemoteNavigationManager : NavigationManager, IHostEnvironmentNavigationManager
Microsoft.AspNetCore.Components.Tests (4)
CascadingParameterStateTest.cs (1)
516class TestNavigationManager : NavigationManager
NavigationManagerTest.cs (1)
871private class TestNavigationManager : NavigationManager
RouteViewTest.cs (1)
166private class RouteViewTestNavigationManager : NavigationManager
Routing\RouterTest.cs (1)
268internal class TestNavigationManager : NavigationManager
Microsoft.AspNetCore.Components.Web.Tests (1)
HtmlRendering\HtmlRendererTest.cs (1)
1394private class TestNavigationManager : NavigationManager
Microsoft.AspNetCore.Components.WebAssembly (1)
Services\WebAssemblyNavigationManager.cs (1)
15internal sealed partial class WebAssemblyNavigationManager : NavigationManager
Microsoft.AspNetCore.Components.WebView (1)
Services\WebViewNavigationManager.cs (1)
9internal sealed partial class WebViewNavigationManager : NavigationManager
146 references to NavigationManager
Aspire.Dashboard (23)
Components\Controls\Chart\PlotlyChart.razor.cs (1)
28public required NavigationManager NavigationManager { get; init; }
Components\Controls\ResourceActions.razor.cs (5)
30public required NavigationManager NavigationManager { get; set; } 77NavigationManager.NavigateTo(DashboardUrls.ConsoleLogsUrl(resource: Resource.Name)); 94NavigationManager.NavigateTo(DashboardUrls.StructuredLogsUrl(resource: GetResourceName(Resource))); 105NavigationManager.NavigateTo(DashboardUrls.TracesUrl(resource: GetResourceName(Resource))); 116NavigationManager.NavigateTo(DashboardUrls.MetricsUrl(resource: GetResourceName(Resource)));
Components\Controls\SpanActions.razor.cs (2)
24public required NavigationManager NavigationManager { get; set; } 50NavigationManager.NavigateTo(DashboardUrls.StructuredLogsUrl(spanId: SpanViewModel.Span.SpanId));
Components\Controls\SummaryDetailsView.razor.cs (5)
62public required NavigationManager NavigationManager { get; init; } 325var viewKey = ViewKey ?? NavigationManager.ToBaseRelativePath(NavigationManager.Uri); 331var viewKey = ViewKey ?? NavigationManager.ToBaseRelativePath(NavigationManager.Uri);
Components\Controls\TraceActions.razor.cs (3)
24public required NavigationManager NavigationManager { get; set; } 41NavigationManager.NavigateTo(DashboardUrls.TraceDetailUrl(Trace.TraceId)); 51NavigationManager.NavigateTo(DashboardUrls.StructuredLogsUrl(traceId: Trace.TraceId));
Components\Layout\MobileNavMenu.razor.cs (2)
18public required NavigationManager NavigationManager { get; init; } 31NavigationManager.NavigateTo(url);
Components\Pages\IPageWithSessionAndUrlState.cs (1)
28public NavigationManager NavigationManager { get; }
Components\Pages\Login.razor.cs (3)
24public required NavigationManager NavigationManager { get; init; } 47NavigationManager.NavigateTo(GetRedirectUrl(), forceLoad: true); 85NavigationManager.NavigateTo(GetRedirectUrl(), forceLoad: true);
Components\Pages\Metrics.razor.cs (1)
54public required NavigationManager NavigationManager { get; init; }
Aspire.Dashboard.Components.Tests (10)
Pages\MetricsTests.cs (4)
76var navigationManager = Services.GetRequiredService<NavigationManager>(); 127var navigationManager = Services.GetRequiredService<NavigationManager>();
Pages\StructuredLogsTests.cs (6)
34var navigationManager = Services.GetRequiredService<NavigationManager>(); 74var navigationManager = Services.GetRequiredService<NavigationManager>(); 112var navigationManager = Services.GetRequiredService<NavigationManager>();
BasicTestApp (1)
Program.cs (1)
67uri = new Uri(host.Services.GetService<NavigationManager>().Uri);
Microsoft.AspNetCore.Components (79)
LocationChangeException.cs (1)
7/// An exception thrown when <see cref="NavigationManager.LocationChanged"/> throws an exception.
NavigationException.cs (1)
7/// Exception thrown when an <see cref="NavigationManager"/> is not able to navigate to a different url.
NavigationManager.cs (2)
564private readonly NavigationManager _navigationManager; 566public LocationChangingRegistration(Func<LocationChangingContext, ValueTask> handler, NavigationManager navigationManager)
NavigationManagerExtensions.cs (69)
14/// Provides extension methods for the <see cref="NavigationManager"/> type. 272/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 275/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 278public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, bool value) 282/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 285/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 292public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, bool? value) 296/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 299/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 302public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateTime value) 306/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 309/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 316public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateTime? value) 320/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 323/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 326public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly value) 330/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 333/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 340public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, DateOnly? value) 344/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 347/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 350public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly value) 354/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 357/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 364public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, TimeOnly? value) 368/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 371/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 374public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, decimal value) 378/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 381/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 388public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, decimal? value) 392/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 395/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 398public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, double value) 402/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 405/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 412public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, double? value) 416/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 419/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 422public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, float value) 426/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 429/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 436public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, float? value) 440/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 443/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 446public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, Guid value) 450/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 453/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 460public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, Guid? value) 464/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 467/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 470public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, int value) 474/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 477/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 484public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, int? value) 488/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 491/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 494public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, long value) 498/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 501/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 508public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, long? value) 512/// Returns a URI that is constructed by updating <see cref="NavigationManager.Uri"/> with a single parameter 515/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 522public static string GetUriWithQueryParameter(this NavigationManager navigationManager, string name, string? value) 539/// Returns a URI constructed from <see cref="NavigationManager.Uri"/> with multiple parameters 542/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 545this NavigationManager navigationManager, 553/// <param name="navigationManager">The <see cref="NavigationManager"/>.</param> 557this NavigationManager navigationManager,
RouteView.cs (1)
32private NavigationManager NavigationManager { get; set; }
Routing\IHostEnvironmentNavigationManager.cs (2)
7/// An optional interface for <see cref="NavigationManager" /> implementations that must be initialized 13/// Initializes the <see cref="NavigationManager" />.
Routing\LocationChangedEventArgs.cs (1)
7/// <see cref="EventArgs" /> for <see cref="NavigationManager.LocationChanged" />.
Routing\Router.cs (1)
42[Inject] private NavigationManager NavigationManager { get; set; }
Routing\SupplyParameterFromQueryValueProvider.cs (1)
10internal sealed class SupplyParameterFromQueryValueProvider(NavigationManager navigationManager) : ICascadingValueSupplier, IDisposable
Microsoft.AspNetCore.Components.Authorization.Tests (1)
AuthorizeRouteViewTest.cs (1)
34serviceCollection.AddSingleton<NavigationManager, TestNavigationManager>();
Microsoft.AspNetCore.Components.Endpoints (2)
DependencyInjection\RazorComponentsServiceCollectionExtensions.cs (1)
60services.TryAddScoped<NavigationManager, HttpNavigationManager>();
Rendering\EndpointHtmlRenderer.cs (1)
79var navigationManager = (IHostEnvironmentNavigationManager)httpContext.RequestServices.GetRequiredService<NavigationManager>();
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
EndpointHtmlRendererTest.cs (2)
1671services.AddSingleton<NavigationManager, HttpNavigationManager>(); 1689[Inject] NavigationManager NavigationManager { get; set; }
RazorComponentResultTest.cs (1)
461.AddSingleton<NavigationManager, FakeNavigationManager>()
Microsoft.AspNetCore.Components.Server (4)
Circuits\CircuitFactory.cs (1)
50var navigationManager = (RemoteNavigationManager)scope.ServiceProvider.GetRequiredService<NavigationManager>();
Circuits\RemoteNavigationManager.cs (2)
13/// A Server-Side Blazor implementation of <see cref="NavigationManager"/>. 38/// Initializes the <see cref="NavigationManager" />.
DependencyInjection\ComponentServiceCollectionExtensions.cs (1)
81services.AddScoped<NavigationManager, RemoteNavigationManager>();
Microsoft.AspNetCore.Components.Tests (3)
NavigationManagerTest.cs (1)
26var actualResult = NavigationManager.NormalizeBaseUri(baseUri);
RouteViewTest.cs (1)
22serviceCollection.AddSingleton<NavigationManager>(_navigationManager);
Routing\RouterTest.cs (1)
24services.AddSingleton<NavigationManager>(_navigationManager);
Microsoft.AspNetCore.Components.Web (5)
HtmlRendering\StaticHtmlRenderer.cs (2)
25private readonly NavigationManager? _navigationManager; 35_navigationManager = serviceProvider.GetService<NavigationManager>();
HtmlRendering\StaticHtmlRenderer.HtmlWriting.cs (1)
360private static string GetRootRelativeUrlForFormAction(NavigationManager navigationManager)
Routing\NavigationLock.cs (1)
27private NavigationManager NavigationManager { get; set; } = default!;
Routing\NavLink.cs (1)
53[Inject] private NavigationManager NavigationManager { get; set; } = default!;
Microsoft.AspNetCore.Components.Web.Tests (4)
HtmlRendering\HtmlRendererTest.cs (4)
1128})).AddScoped<NavigationManager>(_ => new TestNavigationManager(baseUrl, currentUrl))); 1150})).AddScoped<NavigationManager, TestNavigationManager>()); 1172})).AddScoped<NavigationManager, TestNavigationManager>()); 1377services.AddScoped<NavigationManager, TestNavigationManager>();
Microsoft.AspNetCore.Components.WebAssembly (2)
Hosting\WebAssemblyHostBuilder.cs (1)
300Services.AddSingleton<NavigationManager>(WebAssemblyNavigationManager.Instance);
Services\WebAssemblyNavigationManager.cs (1)
13/// Default client-side implementation of <see cref="NavigationManager"/>.
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
Hosting\WebAssemblyHostBuilderTest.cs (3)
147var navigationManager = host.Services.GetRequiredService<NavigationManager>(); 213typeof(NavigationManager),
Microsoft.AspNetCore.Components.WebView (2)
ComponentsWebViewServiceCollectionExtensions.cs (1)
29services.TryAddScoped<NavigationManager, WebViewNavigationManager>();
PageContext.cs (1)
41NavigationManager = (WebViewNavigationManager)ServiceProvider.GetRequiredService<NavigationManager>();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
ComponentTagHelperTest.cs (1)
80var navManager = new Mock<NavigationManager>();
Microsoft.Authentication.WebAssembly.Msal (2)
MsalDefaultOptionsConfiguration.cs (2)
13private readonly NavigationManager _navigationManager; 15public MsalDefaultOptionsConfiguration(NavigationManager navigationManager)
MyFrontend (1)
Components\NavigationManagerExtensions.cs (1)
5public static string ToAbsolutePath(this NavigationManager navigationManager, string uri)