PersistentComponentState.RegisterOnPersisting Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RegisterOnPersisting(Func<Task>) |
Register a callback to persist the component state when the application is about to be paused. Registered callbacks can use this opportunity to persist their state so that it can be retrieved when the application resumes. |
RegisterOnPersisting(Func<Task>, IComponentRenderMode) |
Register a callback to persist the component state when the application is about to be paused. Registered callbacks can use this opportunity to persist their state so that it can be retrieved when the application resumes. |
RegisterOnPersisting(Func<Task>)
- Source:
- PersistentComponentState.cs
- Source:
- PersistentComponentState.cs
- Source:
- PersistentComponentState.cs
- Source:
- PersistentComponentState.cs
Register a callback to persist the component state when the application is about to be paused. Registered callbacks can use this opportunity to persist their state so that it can be retrieved when the application resumes.
public Microsoft.AspNetCore.Components.PersistingComponentStateSubscription RegisterOnPersisting (Func<System.Threading.Tasks.Task> callback);
member this.RegisterOnPersisting : Func<System.Threading.Tasks.Task> -> Microsoft.AspNetCore.Components.PersistingComponentStateSubscription
Public Function RegisterOnPersisting (callback As Func(Of Task)) As PersistingComponentStateSubscription
Parameters
Returns
A subscription that can be used to unregister the callback when disposed.
Applies to
RegisterOnPersisting(Func<Task>, IComponentRenderMode)
- Source:
- PersistentComponentState.cs
- Source:
- PersistentComponentState.cs
Register a callback to persist the component state when the application is about to be paused. Registered callbacks can use this opportunity to persist their state so that it can be retrieved when the application resumes.
public Microsoft.AspNetCore.Components.PersistingComponentStateSubscription RegisterOnPersisting (Func<System.Threading.Tasks.Task> callback, Microsoft.AspNetCore.Components.IComponentRenderMode? renderMode);
member this.RegisterOnPersisting : Func<System.Threading.Tasks.Task> * Microsoft.AspNetCore.Components.IComponentRenderMode -> Microsoft.AspNetCore.Components.PersistingComponentStateSubscription
Public Function RegisterOnPersisting (callback As Func(Of Task), renderMode As IComponentRenderMode) As PersistingComponentStateSubscription
Parameters
- renderMode
- IComponentRenderMode
Returns
A subscription that can be used to unregister the callback when disposed.