語言

IDiagnosticsLogger.NeedsEventData 方法

定義

多載

名稱 Description
NeedsEventData(EventDefinitionBase, Boolean, Boolean)

根據給定事件是否有 a DiagnosticSource 或 IDbContextLogger enabled 來判斷是否需要實EventData例。

NeedsEventData<TInterceptor>(EventDefinitionBase, TInterceptor, Boolean, Boolean)

根據給定事件是否存在 DiagnosticSource、 、 IDbContextLogger或 IInterceptor 啟用,判斷是否需要實EventData例。

NeedsEventData(EventDefinitionBase, Boolean, Boolean)

來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs

根據給定事件是否有 a DiagnosticSource 或 IDbContextLogger enabled 來判斷是否需要實EventData例。

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

若 a DiagnosticSource 啟用false,則設為true;否則。

simpleLogEnabled
Boolean

如果 a IDbContextLogger 被啟用,則是真實true的;false否則。

傳回

true 若啟用診斷來源或 LogTo 記錄器; false 否則,

適用於

NeedsEventData<TInterceptor>(EventDefinitionBase, TInterceptor, Boolean, Boolean)

來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs
來源:
IDiagnosticsLogger.cs

根據給定事件是否存在 DiagnosticSource、 、 IDbContextLogger或 IInterceptor 啟用,判斷是否需要實EventData例。

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

若 a DiagnosticSource 啟用false,則設為true;否則。

simpleLogEnabled
Boolean

如果 a IDbContextLogger 被啟用,則是真實true的;false否則。

傳回

true 若啟用診斷來源、LogTo 記錄器或攔截器; false 否則,

適用於