コード例 #1
0
 internal StreamWithLength(BatchStream stream, int contentLength)
 {
     Debug.Assert(null != stream, "null != stream");
     Debug.Assert(0 < contentLength, "0 < contentLength");
     this.target = stream;
     this.length = contentLength;
 }
コード例 #2
0
            protected override void Dispose(bool disposing)
            {
                base.Dispose(disposing);

                if (disposing && (null != this.target))
                {
                    if (this.target.disposeWithContentStreamDispose)
                    {
                        this.target.contentStream = null;
                        this.target.Dispose();
                    }
                    else if (0 < this.length)
                    {
                        if (null != this.target.reader)
                        {
                            this.target.Seek(this.length, SeekOrigin.Current);
                        }

                        this.length = 0;
                    }

                    this.target.ClearPreviousOperationInformation();
                }

                this.target = null;
            }
コード例 #3
0
 internal StreamWithDelimiter(BatchStream stream)
     : base(stream, Int32.MaxValue)
 {
 }