Exemple #1
0
        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
        }
        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
        }