共用方式為


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

適用於