RazorComponentsRazorComponentBuilderExtensions.RegisterPersistentService<TPersistentService> Method

Definition

Registers a persistent service with the specified render mode in the Razor components builder.

public static Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder RegisterPersistentService<TPersistentService>(this Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder builder, Microsoft.AspNetCore.Components.IComponentRenderMode renderMode);
static member RegisterPersistentService : Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder * Microsoft.AspNetCore.Components.IComponentRenderMode -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder
<Extension()>
Public Function RegisterPersistentService(Of TPersistentService) (builder As IRazorComponentsBuilder, renderMode As IComponentRenderMode) As IRazorComponentsBuilder

Type Parameters

TPersistentService

The service to be registered for state management.

Parameters

renderMode
IComponentRenderMode

The IComponentRenderMode that determines to which render modes the state should be persisted.

Returns

The IRazorComponentsBuilder.

Applies to