Table of Contents

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 IMvvmNavigationManager

Methods

GetUri<TViewModel>()

Gets the URI associated with the specified TViewModel.

string GetUri<TViewModel>() where TViewModel : IViewModelBase

Returns

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

key object

The key used to determine the navigation URI.

Returns

string

A relative URI path for navigation.

Exceptions

ArgumentNullException

Thrown when key is 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 : IViewModelBase

Parameters

forceLoad bool

If true, bypasses client-side routing and forces the browser to load the new page from the server.

replace bool

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 : IViewModelBase

Parameters

options BrowserNavigationOptions

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 : IViewModelBase

Parameters

relativeUri string

The relative URI or query string to append.

forceLoad bool

If true, bypasses client-side routing and forces the browser to load the new page from the server.

replace bool

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 relativeUri is 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 : IViewModelBase

Parameters

relativeUri string

The relative URI or query string to append.

options BrowserNavigationOptions

Additional BrowserNavigationOptions for navigation.

Type Parameters

TViewModel

The type implementing IViewModelBase to determine the navigation URI.

Exceptions

ArgumentNullException

Thrown when relativeUri is 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

key object

The key used to determine the navigation URI.

forceLoad bool

If true, bypasses client-side routing and forces the browser to load the new page from the server.

replace bool

If true, replaces the current entry in the history stack.

Exceptions

ArgumentNullException

Thrown when key is null.

NavigateTo(object, BrowserNavigationOptions)

Navigates to the URI associated with the specified key using browser navigation options.

void NavigateTo(object key, BrowserNavigationOptions options)

Parameters

key object

The key used to determine the navigation URI.

options BrowserNavigationOptions

Additional BrowserNavigationOptions for navigation.

Exceptions

ArgumentNullException

Thrown when key is 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

key object

The key used to determine the navigation URI.

relativeUri string

The relative URI or query string to append.

forceLoad bool

If true, bypasses client-side routing and forces the browser to load the new page from the server.

replace bool

If true, replaces the current entry in the history stack.

Exceptions

ArgumentNullException

Thrown when key or relativeUri is 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

key object

The key used to determine the navigation URI.

relativeUri string

The relative URI or query string to append.

options BrowserNavigationOptions

Additional BrowserNavigationOptions for navigation.

Exceptions

ArgumentNullException

Thrown when key or relativeUri is null.