Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
PersistentComponentState.RegisterOnPersisting Method
Definition
- Namespace:
- Microsoft.AspNetCore.Components
- Assembly:
- Microsoft.AspNetCore.Components.dll
- Package:
- Microsoft.AspNetCore.Components v10.0.0
- Package:
- Microsoft.AspNetCore.Components v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Components v6.0.6
- Package:
- Microsoft.AspNetCore.Components v7.0.5
- Package:
- Microsoft.AspNetCore.Components v8.0.19
- Package:
- Microsoft.AspNetCore.Components v9.0.8
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
| Name | Description |
|---|---|
| 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
- 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
- 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.
Applies to
Feedback
Was this page helpful?
