RazorComponentsServiceCollectionExtensions.AddRazorComponents Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendaftarkan layanan yang diperlukan untuk rendering sisi server Komponen Razor.
public static Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder AddRazorComponents (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOptions>? configure = default);
static member AddRazorComponents : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Components.Endpoints.RazorComponentsServiceOptions> -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder
<Extension()>
Public Function AddRazorComponents (services As IServiceCollection, Optional configure As Action(Of RazorComponentsServiceOptions) = Nothing) As IRazorComponentsBuilder
Parameter
- services
- IServiceCollection
Koleksi layanan.
- configure
- Action<RazorComponentsServiceOptions>
Action<T> untuk mengonfigurasi yang disediakanRazorComponentsServiceOptions.
Mengembalikan
Yang IRazorComponentsBuilder dapat digunakan untuk mengonfigurasi lebih lanjut layanan komponen Razor.