IDiagnosticsLogger.NeedsEventData 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| NeedsEventData(EventDefinitionBase, Boolean, Boolean) |
EventData根据给定事件是否存在DiagnosticSourceIDbContextLogger或启用实例来确定是否需要实例。 |
| NeedsEventData<TInterceptor>(EventDefinitionBase, TInterceptor, Boolean, Boolean) |
EventData根据给定事件是否存在DiagnosticSource实例、IDbContextLogger实例还是IInterceptor启用实例来确定是否需要实例。 |
NeedsEventData(EventDefinitionBase, Boolean, Boolean)
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
EventData根据给定事件是否存在DiagnosticSourceIDbContextLogger或启用实例来确定是否需要实例。
public virtual bool NeedsEventData(Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase definition, out bool diagnosticSourceEnabled, out bool simpleLogEnabled);
abstract member NeedsEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * bool * bool -> bool
override this.NeedsEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * bool * bool -> bool
Public Overridable Function NeedsEventData (definition As EventDefinitionBase, ByRef diagnosticSourceEnabled As Boolean, ByRef simpleLogEnabled As Boolean) As Boolean
参数
- definition
- EventDefinitionBase
事件的定义。
- diagnosticSourceEnabled
- Boolean
如果已启用,DiagnosticSource则设置为“如果已启用”,false则设置为true“否则”。
- simpleLogEnabled
- Boolean
如果启用了 aIDbContextLogger,则为 true True;false否则为 True。
返回
true 如果启用了诊断源或 LogTo 记录器,则为 false 否则。
适用于
NeedsEventData<TInterceptor>(EventDefinitionBase, TInterceptor, Boolean, Boolean)
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
- Source:
- IDiagnosticsLogger.cs
EventData根据给定事件是否存在DiagnosticSource实例、IDbContextLogger实例还是IInterceptor启用实例来确定是否需要实例。
public virtual bool NeedsEventData<TInterceptor>(Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase definition, out TInterceptor? interceptor, out bool diagnosticSourceEnabled, out bool simpleLogEnabled) where TInterceptor : class, Microsoft.EntityFrameworkCore.Diagnostics.IInterceptor;
public virtual bool NeedsEventData<TInterceptor>(Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase definition, out TInterceptor interceptor, out bool diagnosticSourceEnabled, out bool simpleLogEnabled) where TInterceptor : class, Microsoft.EntityFrameworkCore.Diagnostics.IInterceptor;
abstract member NeedsEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * 'Interceptor * bool * bool -> bool (requires 'Interceptor : null and 'Interceptor :> Microsoft.EntityFrameworkCore.Diagnostics.IInterceptor)
override this.NeedsEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * 'Interceptor * bool * bool -> bool (requires 'Interceptor : null and 'Interceptor :> Microsoft.EntityFrameworkCore.Diagnostics.IInterceptor)
Public Overridable Function NeedsEventData(Of TInterceptor As {Class, IInterceptor}) (definition As EventDefinitionBase, ByRef interceptor As TInterceptor, ByRef diagnosticSourceEnabled As Boolean, ByRef simpleLogEnabled As Boolean) As Boolean
类型参数
- TInterceptor
参数
- definition
- EventDefinitionBase
事件的定义。
- interceptor
- TInterceptor
IInterceptor如果启用,则使用;否则为 null。
- diagnosticSourceEnabled
- Boolean
如果已启用,DiagnosticSource则设置为“如果已启用”,false则设置为true“否则”。
- simpleLogEnabled
- Boolean
如果启用了 aIDbContextLogger,则为 true True;false否则为 True。
返回
true 如果启用了诊断源、LogTo 记录器或侦听器,则为 false 否则。