Freigeben über


ObjectPoolServiceCollectionExtensions.ConfigurePool<TService> Methode

Definition

Registriert eine Aktion, die zum Konfigurieren eines DependencyInjectionPoolOptions typisierten Pools verwendet wird.

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

Typparameter

TService

Der Typ der zu poolden Objekte.

Parameter

services
IServiceCollection

Die IServiceCollection, der Dienste hinzugefügt werden sollen.

configure
Action<DependencyInjectionPoolOptions>

Die zum Konfigurieren der Optionen verwendete Aktion.

Gibt zurück

Der Wert von services.

Gilt für: