PersistentComponentState.RegisterOnPersisting Method

Definition

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

callback
Func<Task>

The callback to invoke when the application is being paused.

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

callback
Func<Task>

The callback to invoke when the application is being paused.

Returns

A subscription that can be used to unregister the callback when disposed.

Applies to