Bagikan melalui


AntiforgeryServiceCollectionExtensions.AddAntiforgery Metode

Definisi

Overload

AddAntiforgery(IServiceCollection)

Menambahkan layanan antiforgery ke yang ditentukan IServiceCollection.

AddAntiforgery(IServiceCollection, Action<AntiforgeryOptions>)

Menambahkan layanan antiforgery ke yang ditentukan IServiceCollection.

AddAntiforgery(IServiceCollection)

Sumber:
AntiforgeryServiceCollectionExtensions.cs
Sumber:
AntiforgeryServiceCollectionExtensions.cs
Sumber:
AntiforgeryServiceCollectionExtensions.cs

Menambahkan layanan antiforgery ke yang ditentukan IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAntiforgery : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAntiforgery (services As IServiceCollection) As IServiceCollection

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

Mengembalikan

IServiceCollection Sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk

AddAntiforgery(IServiceCollection, Action<AntiforgeryOptions>)

Sumber:
AntiforgeryServiceCollectionExtensions.cs
Sumber:
AntiforgeryServiceCollectionExtensions.cs
Sumber:
AntiforgeryServiceCollectionExtensions.cs

Menambahkan layanan antiforgery ke yang ditentukan IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAntiforgery (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions> setupAction);
static member AddAntiforgery : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Antiforgery.AntiforgeryOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAntiforgery (services As IServiceCollection, setupAction As Action(Of AntiforgeryOptions)) As IServiceCollection

Parameter

services
IServiceCollection

untuk IServiceCollection menambahkan layanan.

setupAction
Action<AntiforgeryOptions>

Action<T> untuk mengonfigurasi yang disediakanAntiforgeryOptions.

Mengembalikan

IServiceCollection Sehingga panggilan tambahan dapat dirangkai.

Berlaku untuk