Inheritance: System.Exception
Ejemplo n.º 1
0
        /// <summary>
        /// Read the specified buffer, offset and count.
        /// </summary>
        /// <param name='buffer'>
        /// Buffer.
        /// </param>
        /// <param name='offset'>
        /// Offset.
        /// </param>
        /// <param name='count'>
        /// Count.
        /// </param>
        public override int Read(byte[] buffer, int offset, int count) {
            lock(this.l) {
                if (this.aborted) {
                    this.Exception = new AbortException();
                    throw this.exception;
                }
            }

            return this.Stream.Read(buffer, offset, count);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Write the specified buffer, offset and count.
        /// </summary>
        /// <param name='buffer'>
        /// Buffer.
        /// </param>
        /// <param name='offset'>
        /// Offset.
        /// </param>
        /// <param name='count'>
        /// Count.
        /// </param>
        public override void Write(byte[] buffer, int offset, int count) {
            lock(this.l) {
                if (this.aborted) {
                    this.Exception = new AbortException();
                    throw this.exception;
                }
            }

            this.Stream.Write(buffer, offset, count);
        }