İngilizce dilinde oku

Aracılığıyla paylaş


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.

C#
public virtual bool NeedsEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase definition, out bool diagnosticSourceEnabled, out bool simpleLogEnabled);

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

Entity Framework Core 9.0 ve diğer sürümler
Ürün Sürümler
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0

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.

C#
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;
C#
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;

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

Entity Framework Core 9.0 ve diğer sürümler
Ürün Sürümler
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0