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
的值。