private static void SafeDispose(IDisposable handle) { try { if (Logger.InfoEnabled) { Logger.LoopDisposing(handle); } handle.Dispose(); } catch (Exception ex) { if (Logger.WarnEnabled) { Logger.LoopDisposeError(handle, ex); } } }