static LogManager() { #if NET AppDomain.CurrentDomain.DomainUnload += (sender, e) => FlushAll(); AppDomain.CurrentDomain.UnhandledException += (sender, e) => FlushAll(); #endif } #endregion