Share via


InterceptorAggregator<TInterceptor> 类

定义

服务的实现的 IInterceptorAggregator 抽象基类。

public abstract class InterceptorAggregator<TInterceptor> : Microsoft.EntityFrameworkCore.Diagnostics.IInterceptorAggregator where TInterceptor : class, IInterceptor
type InterceptorAggregator<'Interceptor (requires 'Interceptor : null and 'Interceptor :> IInterceptor)> = class
    interface IInterceptorAggregator
Public MustInherit Class InterceptorAggregator(Of TInterceptor)
Implements IInterceptorAggregator

类型参数

TInterceptor

侦听器类型。

继承
InterceptorAggregator<TInterceptor>
实现

注解

服务生存期为 Scoped ,允许多次注册。 这意味着每个 DbContext 实例都将使用此服务自己的一组实例。 实现可能依赖于注册到任何生存期的其他服务。 实现不需要是线程安全的。

有关详细信息和示例 ,请参阅 EF Core 侦听器

构造函数

InterceptorAggregator<TInterceptor>()

服务的实现的 IInterceptorAggregator 抽象基类。

属性

InterceptorType

侦听器类型。

方法

AggregateInterceptors(IReadOnlyList<IInterceptor>)

解析内部服务提供程序中或 中DbContext注册的所有对象的单个 IInterceptor /> 。

CreateChain(IEnumerable<TInterceptor>)

必须由继承类型实现才能从给定列表创建单个侦听器。

适用于