ObjectPoolServiceCollectionExtensions.ConfigurePool<TService> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注册用于配置 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
的值。