Table of Contents

Class TraceInfo

Namespace
LinqToDB.Data
Assembly
linq2db.dll

Tracing information for the DataConnection events.

public class TraceInfo
Inheritance
TraceInfo
Extension Methods

Constructors

TraceInfo(DataConnection, TraceInfoStep, TraceOperation, bool)

Initializes a new instance of the TraceInfo class.

public TraceInfo(DataConnection dataConnection, TraceInfoStep traceInfoStep, TraceOperation operation, bool isAsync)

Parameters

dataConnection DataConnection

DataConnection instance, generated this trace.

traceInfoStep TraceInfoStep

Trace execution step.

operation TraceOperation

Operation associated with trace event.

isAsync bool

Flag indicating whether operation was executed asynchronously.

Properties

Command

Gets or sets the DbCommand associated with the tracing event.

public DbCommand? Command { get; set; }

Property Value

DbCommand

CommandText

Gets or sets the text of the command.

public string? CommandText { get; set; }

Property Value

string

DataConnection

Gets or sets the DataConnection that produced the tracing event.

public DataConnection DataConnection { get; }

Property Value

DataConnection

Exception

Gets or sets the Exception for Error step.

public Exception? Exception { get; set; }

Property Value

Exception

ExecutionTime

Gets or sets the execution time for AfterExecute, Completed, and Error steps.

public TimeSpan? ExecutionTime { get; set; }

Property Value

TimeSpan?

IsAsync

Gets a flag indicating whether operation was executed asynchronously.

public bool IsAsync { get; }

Property Value

bool

MapperExpression

Gets or sets the expression used by the results mapper.

public Expression? MapperExpression { get; set; }

Property Value

Expression

Operation

Gets the operation, for which tracing event generated, TraceOperation.

public TraceOperation Operation { get; }

Property Value

TraceOperation

RecordsAffected

Gets or sets the number of rows affected by the command or the number of rows produced by the DataReader.

public int? RecordsAffected { get; set; }

Property Value

int?

SqlText

Gets the formatted SQL text of the command.

public string SqlText { get; }

Property Value

string

StartTime

Gets or sets the starting DateTime of the operation (UTC).

public DateTime? StartTime { get; set; }

Property Value

DateTime?

TraceInfoStep

Gets the tracing execution step, TraceInfoStep.

public TraceInfoStep TraceInfoStep { get; }

Property Value

TraceInfoStep

TraceLevel

Gets or sets the tracing detail level, TraceLevel.

public TraceLevel TraceLevel { get; set; }

Property Value

TraceLevel