Partager via


AntiforgeryServiceCollectionExtensions.AddAntiforgery Méthode

Définition

Surcharges

AddAntiforgery(IServiceCollection)

Ajoute des services antiforgery au spécifié IServiceCollection.

AddAntiforgery(IServiceCollection, Action<AntiforgeryOptions>)

Ajoute des services antiforgery au spécifié IServiceCollection.

AddAntiforgery(IServiceCollection)

Source:
AntiforgeryServiceCollectionExtensions.cs
Source:
AntiforgeryServiceCollectionExtensions.cs
Source:
AntiforgeryServiceCollectionExtensions.cs

Ajoute des services antiforgery au spécifié 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à

AddAntiforgery(IServiceCollection, Action<AntiforgeryOptions>)

Source:
AntiforgeryServiceCollectionExtensions.cs
Source:
AntiforgeryServiceCollectionExtensions.cs
Source:
AntiforgeryServiceCollectionExtensions.cs

Ajoute des services antiforgery au spécifié 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

Paramètres

services
IServiceCollection

IServiceCollection auquel ajouter les services.

setupAction
Action<AntiforgeryOptions>

Action<T> pour configurer le AntiforgeryOptions fourni.

Retours

IServiceCollection à utiliser pour chaîner des appels supplémentaires.

S’applique à