HttpsRedirectionServicesExtensions.AddHttpsRedirection 方法

定义

添加 HTTPS 重定向服务。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddHttpsRedirection(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::HttpsPolicy::HttpsRedirectionOptions ^> ^ configureOptions);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddHttpsRedirection (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionOptions> configureOptions);
static member AddHttpsRedirection : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddHttpsRedirection (services As IServiceCollection, configureOptions As Action(Of HttpsRedirectionOptions)) As IServiceCollection

参数

services
IServiceCollection

IServiceCollection用于添加服务的 。

configureOptions
Action<HttpsRedirectionOptions>

用于配置 HttpsRedirectionOptions 的委托。

返回

适用于