C# Класс StackExchange.Profiling.SqlTiming

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AddSpacesToParameters string
GetCommandParameters List
GetDbType string
GetDurationMilliseconds decimal
GetParameterSize int
GetValue string
SqlTiming System

Открытые методы

Метод Описание
Equals ( object rValue ) : bool

Returns true if Ids match.

ExecutionComplete ( bool isReader ) : void

Called when command execution is finished to determine this SqlTiming's duration.

GetHashCode ( ) : int

Returns hash code of Id.

ReaderFetchComplete ( ) : void

Called when database reader is closed, ending profiling for StackExchange.Profiling.Data.ExecuteType.Reader SqlTimings.

SqlTiming ( IDbCommand command, ExecuteType type, StackExchange.Profiling.MiniProfiler profiler ) : System

Initialises a new instance of the SqlTiming class. Creates a new SqlTiming to profile 'command'.

ToString ( ) : string

Returns a snippet of the SQL command and the duration.

Приватные методы

Метод Описание
AddSpacesToParameters ( string commandString ) : string

To help with display, put some space around sammiched commas

GetCommandParameters ( IDbCommand command ) : List

get the command parameters.

GetDbType ( IDataParameter parameter ) : string

Returns the DbType as string, accounting for table parameter types

GetDurationMilliseconds ( ) : decimal

get the duration in milliseconds.

GetParameterSize ( IDbDataParameter parameter ) : int

get the parameter size.

GetValue ( IDataParameter parameter ) : string

Returns the value of parameter suitable for storage/display.

SqlTiming ( ) : System

Описание методов

Equals() публичный Метод

Returns true if Ids match.
public Equals ( object rValue ) : bool
rValue object /// The rValue. ///
Результат bool

ExecutionComplete() публичный Метод

Called when command execution is finished to determine this SqlTiming's duration.
public ExecutionComplete ( bool isReader ) : void
isReader bool The Reader.
Результат void

GetHashCode() публичный Метод

Returns hash code of Id.
public GetHashCode ( ) : int
Результат int

ReaderFetchComplete() публичный Метод

Called when database reader is closed, ending profiling for StackExchange.Profiling.Data.ExecuteType.Reader SqlTimings.
public ReaderFetchComplete ( ) : void
Результат void

SqlTiming() публичный Метод

Initialises a new instance of the SqlTiming class. Creates a new SqlTiming to profile 'command'.
public SqlTiming ( IDbCommand command, ExecuteType type, StackExchange.Profiling.MiniProfiler profiler ) : System
command IDbCommand The command.
type ExecuteType The type.
profiler StackExchange.Profiling.MiniProfiler The profiler.
Результат System

ToString() публичный Метод

Returns a snippet of the SQL command and the duration.
public ToString ( ) : string
Результат string