共用方式為


HostFilteringServicesExtensions.AddHostFiltering 方法

定義

新增主機篩選中介軟體的服務與選項。

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

參數

services
IServiceCollection

IServiceCollection用於新增服務的 。

configureOptions
Action<HostFilteringOptions>

設定 HostFilteringOptions 的委派。

傳回

適用於