ObjectPoolServiceCollectionExtensions.ConfigurePool<TService> 方法

定义

注册用于配置 DependencyInjectionPoolOptions 类型化池的 的操作。

public:
generic <typename TService>
 where TService : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ ConfigurePool(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::ObjectPool::DependencyInjectionPoolOptions ^> ^ configure);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigurePool<TService> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.ObjectPool.DependencyInjectionPoolOptions> configure) where TService : class;
static member ConfigurePool : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.ObjectPool.DependencyInjectionPoolOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Service : null)
<Extension()>
Public Function ConfigurePool(Of TService As Class) (services As IServiceCollection, configure As Action(Of DependencyInjectionPoolOptions)) As IServiceCollection

类型参数

TService

要池的对象的类型。

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

configure
Action<DependencyInjectionPoolOptions>

用于配置选项的操作。

返回

services 的值。

适用于