Compartilhar via


RoutingServiceCollectionExtensions.AddRouting Método

Definição

Sobrecargas

AddRouting(IServiceCollection)

Adiciona serviços necessários para solicitações de roteamento.

AddRouting(IServiceCollection, Action<RouteOptions>)

Adiciona serviços necessários para solicitações de roteamento.

AddRouting(IServiceCollection)

Origem:
RoutingServiceCollectionExtensions.cs
Origem:
RoutingServiceCollectionExtensions.cs
Origem:
RoutingServiceCollectionExtensions.cs

Adiciona serviços necessários para solicitações de roteamento.

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

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar os serviços.

Retornos

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a

AddRouting(IServiceCollection, Action<RouteOptions>)

Origem:
RoutingServiceCollectionExtensions.cs
Origem:
RoutingServiceCollectionExtensions.cs
Origem:
RoutingServiceCollectionExtensions.cs

Adiciona serviços necessários para solicitações de roteamento.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRouting (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Routing.RouteOptions> configureOptions);
static member AddRouting : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Routing.RouteOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRouting (services As IServiceCollection, configureOptions As Action(Of RouteOptions)) As IServiceCollection

Parâmetros

services
IServiceCollection

O IServiceCollection ao qual adicionar os serviços.

configureOptions
Action<RouteOptions>

As opções de roteamento com as quais configurar o middleware.

Retornos

O IServiceCollection para que chamadas adicionais possam ser encadeadas.

Aplica-se a