コード例 #1
0
        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (IsOpen)
                    {
                        // TODO: Report the error
                    }

                    if (Locker != null)
                    {
                        Locker.Dispose();
                    }

                    if (TableComposite != null)
                    {
                        TableComposite.Dispose();
                    }

                    if (TransactionFactory != null &&
                        (TransactionFactory is IDisposable))
                    {
                        (TransactionFactory as IDisposable).Dispose();
                    }

                    if (Context != null)
                    {
                        Context.Dispose();
                    }

                    if (System != null)
                    {
                        System.RemoveDatabase(this);
                    }
                }

                TransactionFactory = null;
                Locker             = null;
                System             = null;
                TableComposite     = null;
                Context            = null;
                disposed           = true;
            }
        }
コード例 #2
0
ファイル: Database.cs プロジェクト: meikeric/deveeldb
        private void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (IsOpen)
                    {
                        // TODO: Report the error
                    }

                    if (Locker != null)
                    {
                        Locker.Reset();
                    }

                    if (TableComposite != null)
                    {
                        TableComposite.Dispose();
                    }

                    if (Context != null)
                    {
                        Context.Dispose();
                    }

                    if (System != null)
                    {
                        System.RemoveDatabase(this);
                    }
                }

                Locker         = null;
                System         = null;
                TableComposite = null;
                Context        = null;
                disposed       = true;
            }
        }