RoutingServiceCollectionExtensions.AddRouting 方法

定义

重载

AddRouting(IServiceCollection)

添加路由请求所需的服务。

AddRouting(IServiceCollection, Action<RouteOptions>)

添加路由请求所需的服务。

AddRouting(IServiceCollection)

Source:
RoutingServiceCollectionExtensions.cs
Source:
RoutingServiceCollectionExtensions.cs
Source:
RoutingServiceCollectionExtensions.cs

添加路由请求所需的服务。

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

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

返回

IServiceCollection,以便可以链接其他调用。

适用于

AddRouting(IServiceCollection, Action<RouteOptions>)

Source:
RoutingServiceCollectionExtensions.cs
Source:
RoutingServiceCollectionExtensions.cs
Source:
RoutingServiceCollectionExtensions.cs

添加路由请求所需的服务。

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

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

configureOptions
Action<RouteOptions>

用于配置中间件的路由选项。

返回

IServiceCollection,以便可以链接其他调用。

适用于