@@ -73,7 +73,7 @@ public DbCommand Generate(CommandType type, SqlString sqlString, SqlType[] param
7373
7474 var cmd = _factory . ConnectionProvider . Driver . GenerateCommand ( type , sql , parameterTypes ) ;
7575 LogOpenPreparedCommand ( ) ;
76- if ( Log . IsDebugEnabled )
76+ if ( Log . IsDebugEnabled ( ) )
7777 {
7878 Log . Debug ( "Building an DbCommand object for the SqlString: {0}" , sql ) ;
7979 }
@@ -122,7 +122,7 @@ public virtual DbCommand PrepareBatchCommand(CommandType type, SqlString sql, Sq
122122 {
123123 if ( sql . Equals ( _batchCommandSql ) && ArrayHelper . ArrayEquals ( parameterTypes , _batchCommandParameterTypes ) )
124124 {
125- if ( Log . IsDebugEnabled )
125+ if ( Log . IsDebugEnabled ( ) )
126126 {
127127 Log . Debug ( "reusing command {0}" , _batchCommand . CommandText ) ;
128128 }
@@ -190,7 +190,7 @@ public int ExecuteNonQuery(DbCommand cmd)
190190 LogCommand ( cmd ) ;
191191 Prepare ( cmd ) ;
192192 Stopwatch duration = null ;
193- if ( Log . IsDebugEnabled )
193+ if ( Log . IsDebugEnabled ( ) )
194194 duration = Stopwatch . StartNew ( ) ;
195195 try
196196 {
@@ -204,7 +204,7 @@ public int ExecuteNonQuery(DbCommand cmd)
204204 }
205205 finally
206206 {
207- if ( Log . IsDebugEnabled && duration != null )
207+ if ( Log . IsDebugEnabled ( ) && duration != null )
208208 Log . Debug ( "ExecuteNonQuery took {0} ms" , duration . ElapsedMilliseconds ) ;
209209 }
210210 }
@@ -215,7 +215,7 @@ public virtual DbDataReader ExecuteReader(DbCommand cmd)
215215 LogCommand ( cmd ) ;
216216 Prepare ( cmd ) ;
217217 Stopwatch duration = null ;
218- if ( Log . IsDebugEnabled )
218+ if ( Log . IsDebugEnabled ( ) )
219219 duration = Stopwatch . StartNew ( ) ;
220220 DbDataReader reader = null ;
221221 try
@@ -230,7 +230,7 @@ public virtual DbDataReader ExecuteReader(DbCommand cmd)
230230 }
231231 finally
232232 {
233- if ( Log . IsDebugEnabled && duration != null && reader != null )
233+ if ( Log . IsDebugEnabled ( ) && duration != null && reader != null )
234234 {
235235 Log . Debug ( "ExecuteReader took {0} ms" , duration . ElapsedMilliseconds ) ;
236236 _readersDuration [ reader ] = duration ;
@@ -388,7 +388,7 @@ private Stopwatch GetReaderStopwatch(DbDataReader reader)
388388
389389 private static void LogDuration ( Stopwatch duration )
390390 {
391- if ( ! Log . IsDebugEnabled || duration == null ) return ;
391+ if ( ! Log . IsDebugEnabled ( ) || duration == null ) return ;
392392
393393 Log . Debug ( "DataReader was closed after {0} ms" , duration . ElapsedMilliseconds ) ;
394394 }
@@ -415,11 +415,11 @@ public void ExecuteBatch()
415415 protected void ExecuteBatchWithTiming ( DbCommand ps )
416416 {
417417 Stopwatch duration = null ;
418- if ( Log . IsDebugEnabled )
418+ if ( Log . IsDebugEnabled ( ) )
419419 duration = Stopwatch . StartNew ( ) ;
420420 var countBeforeExecutingBatch = CountOfStatementsInCurrentBatch ;
421421 DoExecuteBatch ( ps ) ;
422- if ( Log . IsDebugEnabled && duration != null )
422+ if ( Log . IsDebugEnabled ( ) && duration != null )
423423 Log . Debug ( "ExecuteBatch for {0} statements took {1} ms" ,
424424 countBeforeExecutingBatch ,
425425 duration . ElapsedMilliseconds ) ;
@@ -478,7 +478,7 @@ protected void LogCommand(DbCommand command)
478478
479479 private void LogOpenPreparedCommand ( )
480480 {
481- if ( Log . IsDebugEnabled )
481+ if ( Log . IsDebugEnabled ( ) )
482482 {
483483 int currentOpenCommandCount = Interlocked . Increment ( ref _openCommandCount ) ;
484484 Log . Debug ( "Opened new DbCommand, open DbCommands: {0}" , currentOpenCommandCount ) ;
@@ -492,7 +492,7 @@ private void LogOpenPreparedCommand()
492492
493493 private void LogClosePreparedCommand ( )
494494 {
495- if ( Log . IsDebugEnabled )
495+ if ( Log . IsDebugEnabled ( ) )
496496 {
497497 int currentOpenCommandCount = Interlocked . Decrement ( ref _openCommandCount ) ;
498498 Log . Debug ( "Closed DbCommand, open DbCommands: {0}" , currentOpenCommandCount ) ;
@@ -506,7 +506,7 @@ private void LogClosePreparedCommand()
506506
507507 private static void LogOpenReader ( )
508508 {
509- if ( Log . IsDebugEnabled )
509+ if ( Log . IsDebugEnabled ( ) )
510510 {
511511 int currentOpenReaderCount = Interlocked . Increment ( ref _openReaderCount ) ;
512512 Log . Debug ( "Opened DbDataReader, open DbDataReaders: {0}" , currentOpenReaderCount ) ;
@@ -515,7 +515,7 @@ private static void LogOpenReader()
515515
516516 private static void LogCloseReader ( )
517517 {
518- if ( Log . IsDebugEnabled )
518+ if ( Log . IsDebugEnabled ( ) )
519519 {
520520 int currentOpenReaderCount = Interlocked . Decrement ( ref _openReaderCount ) ;
521521 Log . Debug ( "Closed DbDataReader, open DbDataReaders :{0}" , currentOpenReaderCount ) ;
0 commit comments