ObjectPoolServiceCollectionExtensions 类

定义

用于添加到 ObjectPool<T> DI 容器的扩展方法。

public ref class ObjectPoolServiceCollectionExtensions abstract sealed
public static class ObjectPoolServiceCollectionExtensions
type ObjectPoolServiceCollectionExtensions = class
Public Module ObjectPoolServiceCollectionExtensions
继承
ObjectPoolServiceCollectionExtensions

方法

AddPooled<TService,TImplementation>(IServiceCollection, Action<DependencyInjectionPoolOptions>)

添加 并 ObjectPool<T> 让 DI 返回作用域内实例 TService

AddPooled<TService>(IServiceCollection, Action<DependencyInjectionPoolOptions>)

添加 并 ObjectPool<T> 让 DI 返回作用域内实例 TService

ConfigurePool<TService>(IServiceCollection, Action<DependencyInjectionPoolOptions>)

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

ConfigurePools(IServiceCollection, IConfigurationSection)

配置 DI 池。

适用于