Example #1
0
 /// <summary>
 /// Dispose(bool disposing) executes in two distinct scenarios.
 /// If disposing equals true, the method has been called directly
 /// or indirectly by a user's code. Managed and unmanaged resources
 /// can be disposed.
 /// </summary>
 /// <param name="disposing">
 /// If disposing equals false, the method is called by the
 /// runtime from inside the finalizer and you should not reference
 /// other objects. Only unmanaged resources can be disposed.
 /// </param>
 protected virtual void Dispose(bool disposing)
 {
     if (!disposed && disposing)
     {
         if (logger != null)
         {
             logger.AddTestStatistic();
             logger.Dispose();
         }
         DisposeAdapters();
         initializeActions.Clear();
         cleanupActions.Clear();
     }
     disposed = true;
 }