次の方法で共有


IDiagnosticsLogger.NeedsEventData Method

Definition

Overloads

NeedsEventData(EventDefinitionBase, Boolean, Boolean)

Determines whether an EventData instance is needed based on whether or not there is a DiagnosticSource or an IDbContextLogger enabled for the given event.

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

Determines whether an EventData instance is needed based on whether or not there is a DiagnosticSource, an IDbContextLogger, or an IInterceptor enabled for the given event.

NeedsEventData(EventDefinitionBase, Boolean, Boolean)

Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs

Determines whether an EventData instance is needed based on whether or not there is a DiagnosticSource or an IDbContextLogger enabled for the given event.

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

Parameters

definition
EventDefinitionBase

The definition of the event.

diagnosticSourceEnabled
Boolean

Set to true if a DiagnosticSource is enabled; false otherwise.

simpleLogEnabled
Boolean

True to true if a IDbContextLogger is enabled; false otherwise.

Returns

true if either a diagnostic source or a LogTo logger is enabled; false otherwise.

Applies to

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

Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs
Source:
IDiagnosticsLogger.cs

Determines whether an EventData instance is needed based on whether or not there is a DiagnosticSource, an IDbContextLogger, or an IInterceptor enabled for the given event.

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

Type Parameters

TInterceptor

Parameters

definition
EventDefinitionBase

The definition of the event.

interceptor
TInterceptor

The IInterceptor to use if enabled; otherwise null.

diagnosticSourceEnabled
Boolean

Set to true if a DiagnosticSource is enabled; false otherwise.

simpleLogEnabled
Boolean

True to true if a IDbContextLogger is enabled; false otherwise.

Returns

true if either a diagnostic source, a LogTo logger, or an interceptor is enabled; false otherwise.

Applies to