语言

InterceptorAggregator<TInterceptor> 类

定义

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

[System.Runtime.CompilerServices.Nullable(0)]
public abstract class InterceptorAggregator<TInterceptor> : Microsoft.EntityFrameworkCore.Diagnostics.IInterceptorAggregator where TInterceptor : class, IInterceptor
public abstract class InterceptorAggregator<TInterceptor> : Microsoft.EntityFrameworkCore.Diagnostics.IInterceptorAggregator where TInterceptor : class, IInterceptor
[<System.Runtime.CompilerServices.Nullable(0)>]
type InterceptorAggregator<'Interceptor (requires 'Interceptor : null and 'Interceptor :> IInterceptor)> = class
    interface IInterceptorAggregator
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>)

必须通过继承类型来实现,才能从给定列表中创建单个侦听器。

适用于