Compartir a través de


AntiforgeryServiceCollectionExtensions.AddAntiforgery Método

Definición

Sobrecargas

AddAntiforgery(IServiceCollection)

Agrega servicios antifalsificación al especificado IServiceCollection.

AddAntiforgery(IServiceCollection, Action<AntiforgeryOptions>)

Agrega servicios antifalsificación al especificado IServiceCollection.

AddAntiforgery(IServiceCollection)

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

Agrega servicios antifalsificación al especificado 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a

AddAntiforgery(IServiceCollection, Action<AntiforgeryOptions>)

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

Agrega servicios antifalsificación al especificado 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

Parámetros

services
IServiceCollection

La interfaz IServiceCollection a la que se van a agregar los servicios.

setupAction
Action<AntiforgeryOptions>

Action<T> para configurar el objeto AntiforgeryOptions proporcionado.

Devoluciones

La interfaz IServiceCollection para que se puedan encadenar llamadas adicionales.

Se aplica a