Interface IMvvmNavigationManager
- Namespace
- Blazing.Mvvm.Components
- Assembly
- Blazing.Mvvm.Base.dll
Provides an abstraction for querying and managing navigation via ViewModel (class/interface) in Blazor MVVM applications. Supports navigation by ViewModel type or key, with options for force load, history replacement, and custom browser navigation options.
public interface IMvvmNavigationManagerMethods
GetUri<TViewModel>()
Gets the URI associated with the specified TViewModel.
string GetUri<TViewModel>() where TViewModel : IViewModelBaseReturns
- string
-
A relative URI path for navigation.
Type Parameters
TViewModel-
The type implementing IViewModelBase to determine the navigation URI.
Exceptions
- ArgumentException
-
Thrown when the ViewModel type has no associated route.
GetUri(object)
Gets the URI associated with the specified key.
string GetUri(object key)Parameters
keyobject-
The key used to determine the navigation URI.
Returns
- string
-
A relative URI path for navigation.
Exceptions
- ArgumentNullException
-
Thrown when
keyis null.
NavigateTo<TViewModel>(bool, bool)
Navigates to the URI associated with the specified TViewModel.
void NavigateTo<TViewModel>(bool forceLoad = false, bool replace = false) where TViewModel : IViewModelBaseParameters
forceLoadbool-
If
true, bypasses client-side routing and forces the browser to load the new page from the server. replacebool-
If
true, replaces the current entry in the history stack; otherwise, appends a new entry.
Type Parameters
TViewModel-
The type implementing IViewModelBase to determine the navigation URI.
NavigateTo<TViewModel>(BrowserNavigationOptions)
Navigates to the URI associated with the specified TViewModel using browser navigation options.
void NavigateTo<TViewModel>(BrowserNavigationOptions options) where TViewModel : IViewModelBaseParameters
optionsBrowserNavigationOptions-
Additional BrowserNavigationOptions for navigation.
Type Parameters
TViewModel-
The type implementing IViewModelBase to determine the navigation URI.
NavigateTo<TViewModel>(string, bool, bool)
Navigates to the URI associated with the specified TViewModel, appending a relative URI or query string.
void NavigateTo<TViewModel>(string relativeUri, bool forceLoad = false, bool replace = false) where TViewModel : IViewModelBaseParameters
relativeUristring-
The relative URI or query string to append.
forceLoadbool-
If
true, bypasses client-side routing and forces the browser to load the new page from the server. replacebool-
If
true, replaces the current entry in the history stack.
Type Parameters
TViewModel-
The type implementing IViewModelBase to determine the navigation URI.
Exceptions
- ArgumentNullException
-
Thrown when
relativeUriis null.
NavigateTo<TViewModel>(string, BrowserNavigationOptions)
Navigates to the URI associated with the specified TViewModel, appending a relative URI or query string and using browser navigation options.
void NavigateTo<TViewModel>(string relativeUri, BrowserNavigationOptions options) where TViewModel : IViewModelBaseParameters
relativeUristring-
The relative URI or query string to append.
optionsBrowserNavigationOptions-
Additional BrowserNavigationOptions for navigation.
Type Parameters
TViewModel-
The type implementing IViewModelBase to determine the navigation URI.
Exceptions
- ArgumentNullException
-
Thrown when
relativeUriis null.
NavigateTo(object, bool, bool)
Navigates to the URI associated with the specified key.
void NavigateTo(object key, bool forceLoad = false, bool replace = false)Parameters
keyobject-
The key used to determine the navigation URI.
forceLoadbool-
If
true, bypasses client-side routing and forces the browser to load the new page from the server. replacebool-
If
true, replaces the current entry in the history stack.
Exceptions
- ArgumentNullException
-
Thrown when
keyis null.
NavigateTo(object, BrowserNavigationOptions)
Navigates to the URI associated with the specified key using browser navigation options.
void NavigateTo(object key, BrowserNavigationOptions options)Parameters
keyobject-
The key used to determine the navigation URI.
optionsBrowserNavigationOptions-
Additional BrowserNavigationOptions for navigation.
Exceptions
- ArgumentNullException
-
Thrown when
keyis null.
NavigateTo(object, string, bool, bool)
Navigates to the URI associated with the specified key, appending a relative URI or query string.
void NavigateTo(object key, string relativeUri, bool forceLoad = false, bool replace = false)Parameters
keyobject-
The key used to determine the navigation URI.
relativeUristring-
The relative URI or query string to append.
forceLoadbool-
If
true, bypasses client-side routing and forces the browser to load the new page from the server. replacebool-
If
true, replaces the current entry in the history stack.
Exceptions
- ArgumentNullException
-
Thrown when
keyorrelativeUriis null.
NavigateTo(object, string, BrowserNavigationOptions)
Navigates to the URI associated with the specified key, appending a relative URI or query string and using browser navigation options.
void NavigateTo(object key, string relativeUri, BrowserNavigationOptions options)Parameters
keyobject-
The key used to determine the navigation URI.
relativeUristring-
The relative URI or query string to append.
optionsBrowserNavigationOptions-
Additional BrowserNavigationOptions for navigation.
Exceptions
- ArgumentNullException
-
Thrown when
keyorrelativeUriis null.