コード例 #1
0
        public void ModelTrackerCollection_DisposedCollection_Dispose_ThrowsException()
        {
            bool exc = false;

            try {
                Disposed.Dispose();
            } catch {
                exc = true;
            }

            Assert.IsTrue(exc);
        }
コード例 #2
0
        private void Dispose(bool disposing)
        {
            if (m_isDisposed)
            {
                return;
            }

            Disposing.Raise(this, EventArgs.Empty);
            if (disposing)
            {
                DisposeManagedResources();
            }

            DisposeUnmanagedResources();
            Disposed.Raise(this, EventArgs.Empty);

            Disposing.Dispose();
            Disposed.Dispose();
            m_isDisposed = true;
        }