internal virtual void DelegatedTransactionEnded()
 {
     Bid.Trace("<prov.DbConnectionInternal.DelegatedTransactionEnded|RES|CPOOL> %d#, Delegated Transaction Completed.\n", this.ObjectID);
     if (1 == this._pooledCount)
     {
         this.TerminateStasis(true);
         this.Deactivate();
         System.Data.ProviderBase.DbConnectionPool pool = this.Pool;
         if (pool == null)
         {
             throw System.Data.Common.ADP.InternalError(System.Data.Common.ADP.InternalErrorCode.PooledObjectWithoutPool);
         }
         pool.PutObjectFromTransactedPool(this);
     }
     else if ((-1 == this._pooledCount) && !this._owningObject.IsAlive)
     {
         this.TerminateStasis(false);
         this.Deactivate();
         this.PerformanceCounters.NumberOfNonPooledConnections.Decrement();
         this.Dispose();
     }
 }