語言

IRazorComponentsBuilder 介面

定義

可用來設定Razor元件的產生器。

public interface IRazorComponentsBuilder
type IRazorComponentsBuilder = interface
Public Interface IRazorComponentsBuilder
衍生

屬性

名稱 Description
Services

取得 IServiceCollection。

擴充方法

名稱 Description
AddAuthenticationStateSerialization(IRazorComponentsBuilder, Action<AuthenticationStateSerializationOptions>)

透過客戶端AuthenticationStateProvider的反序列化功能,將伺服器端回傳PersistentComponentStateAuthenticationStateProvider的 序列AuthenticationState化,供互動式 WebAssembly 元件使用,該功能可透過 Microsoft 呼叫 AddAuthenticationStateDeSerialization 來新增。AspNetCore.Components.WebAssembly.Authentication 套件在客戶端專案中。

AddInteractiveServerComponents(IRazorComponentsBuilder, Action<CircuitOptions>)

新增服務以支援在razor元件應用程式中轉譯互動式伺服器元件。

AddInteractiveWebAssemblyComponents(IRazorComponentsBuilder, Action<WebAssemblyComponentsOptions>)

新增服務以支持轉譯互動式 WebAssembly 元件。

AddInteractiveWebAssemblyComponents(IRazorComponentsBuilder)

新增服務以支持轉譯互動式 WebAssembly 元件。

RegisterPersistentService<TPersistentService>(IRazorComponentsBuilder, IComponentRenderMode)

在 Razor 元件建構器中註冊一個持久服務,並以指定的渲染模式進行。

適用於