static NpgsqlConnectorPool() { ConnectorPoolMgr = new NpgsqlConnectorPool(); #if !DNXCORE50 AppDomain.CurrentDomain.DomainUnload += (sender, args) => { Thread.Sleep(3); ConnectorPoolMgr.ClearAllPools(); }; AppDomain.CurrentDomain.ProcessExit += (sender, args) => { Thread.Sleep(3); ConnectorPoolMgr.ClearAllPools(); }; #endif }