Пример #1
0
        internal void EnsureNotClosed()
        {
            if (!IsInClosedState)
            {
                return;
            }

            ObjectDisposedException ex = new ObjectDisposedException(SR.ObjectDisposed_AsyncInfoIsClosed);

            ex.SetErrorCode(HResults.E_ILLEGAL_METHOD_CALL);
            throw ex;
        }
Пример #2
0
        private Stream EnsureNotDisposed()
        {
            Stream str = _managedStream;

            if (str == null)
            {
                ObjectDisposedException ex = new ObjectDisposedException(SR.ObjectDisposed_CannotPerformOperation);
                ex.SetErrorCode(HResults.RO_E_CLOSED);
                throw ex;
            }

            return(str);
        }
Пример #3
0
        private Stream EnsureNotDisposed()
        {
            Stream str = _managedStream;

            if (str == null)
            {
                ObjectDisposedException ex = new ObjectDisposedException(SR.ObjectDisposed_CannotPerformOperation);
                ex.SetErrorCode(HResults.RO_E_CLOSED);
                throw ex;
            }

            return str;
        }