Definition
Assembly: CloudNimble.BlazorEssentials.dll Namespace: CloudNimble.BlazorEssentials Inheritance: CloudNimble.BlazorEssentials.BlazorObservableSyntax
Summary
A base class to control application-wide state in a Blazor app.Constructors
.ctor
Syntax
Parameters
.ctor Inherited
Inherited from
CloudNimble.BlazorEssentials.BlazorObservableSyntax
Parameters
Properties
AuthenticationStateProvider
The AppStateBase.AuthenticationStateProvider instance for the application.Syntax
Property Value
Type:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider
Remarks
This property correctly registers for and de-registers from AppStateBase.AuthenticationStateProvider events as the value is set, and automatically calls AppStateBase.RefreshClaimsPrincipal for you.ClaimsPrincipal
The AppStateBase.ClaimsPrincipal returned from calling User.Syntax
Property Value
Type:System.Security.Claims.ClaimsPrincipal
CurrentNavItem
The NavigationItem from AppStateBase.NavItems that corresponds to the current Route.Syntax
Property Value
Type:CloudNimble.BlazorEssentials.Navigation.NavigationItem
Environment
The WebAssemblyHostEnvironment injected from the DI container.Syntax
Property Value
Type:Microsoft.AspNetCore.Components.WebAssembly.Hosting.IWebAssemblyHostEnvironment
HttpClientFactory
The instance of the IHttpClientFactory injected by the DI system.Syntax
Property Value
Type:System.Net.Http.IHttpClientFactory
IsClaimsPrincipalAuthenticated
Returns a value indicating whether or not the current AppStateBase.ClaimsPrincipalClaimsPrincipal’s</see> Identity is authenticated.Syntax
Property Value
Type:bool
JSRuntime
Syntax
Property Value
Type:Microsoft.JSInterop.IJSRuntime
LoadingStatus Inherited
Inherited from
CloudNimble.BlazorEssentials.BlazorObservableSyntax
Property Value
Type:CloudNimble.BlazorEssentials.LoadingStatus
NavigationHistory
Allows the application to interact with the browser’s History API.Syntax
Property Value
Type:CloudNimble.BlazorEssentials.Navigation.NavigationHistory
Remarks
This really should be a part of the NavigationManager, but what do we know? ¯_(ツ)_/¯NavigationManager
The instance of the AppStateBase.NavigationManager injected by the DI system.Syntax
Property Value
Type:Microsoft.AspNetCore.Components.NavigationManager
NavItems
An ObservableCollection`1 containing the primary navigation details for the application.Syntax
Property Value
Type:System.Collections.ObjectModel.ObservableCollection<CloudNimble.BlazorEssentials.Navigation.NavigationItem>
StateHasChanged Inherited
Inherited from
CloudNimble.BlazorEssentials.BlazorObservableSyntax
Property Value
Type:CloudNimble.BlazorEssentials.StateHasChangedConfig
Methods
Dispose Override
Inherited from
CloudNimble.BlazorEssentials.BlazorObservableSyntax
Parameters
LoadNavItems
Load the NavigationItems into AppStateBase.NavItems and properly wire up the PropertyChanged event.Syntax
Parameters
Navigate
Navigates to the specified Uri and sets AppStateBase.CurrentNavItem to the matching NavigationItem in AppStateBase.NavItems.Syntax
Parameters
NavigateBackAsync
Utilizes the injected AppStateBase.NavigationHistory History API to navigate to the last entry in the history stack, and attempts to set the AppStateBase.CurrentNavItem.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
A Task representing the completion state of the operation.
Remarks
Will not throw an exception if you are at the bottom of the History stack.NavigateForwardAsync
Utilizes the injected AppStateBase.NavigationHistory History API to navigate to the next entry in the history stack, and attempts to set the AppStateBase.CurrentNavItem.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
A Task representing the completion state of the operation.
Remarks
Will not throw an exception if you are at the top of the History stack.OpenInNewTab
Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
Remarks
https://stackoverflow.com/a/62769092RefreshClaimsPrincipal
Tells the AuthenticationProvider to get the latest ClaimsPrincipal and run it through the internal AuthenticationStateChanged handler.Syntax
Returns
Type:System.Threading.Tasks.Task
A Task representing the completion state of the operation.