コード例 #1
0
 private static void CreateMisuseDetectorIfNotExisted(ILoggerFactory loggerFactory)
 {
     if (_misuseDetector == null)
     {
         lock (SyncRoot)
         {
             if (_misuseDetector == null)
             {
                 _misuseDetector = new MisuseDetector(typeof(DbConnection), loggerFactory, 100);
             }
         }
     }
 }
コード例 #2
0
 private void InitializeMisuseDetector()
 {
     if (misuseDetector == null)
     {
         lock (MisuseDetectorSync)
         {
             if (misuseDetector == null)
             {
                 misuseDetector = new MisuseDetector(typeof(HashedWheelTimer), this.Logger, 256);
             }
         }
     }
 }