void TerminateExistingStream()
 {
     Log.WriteDebug("TerminateExistingStream(), previous stream was " + _previousStream == null ? "null" : "not null");
     if (_previousStream != null)
     {
         _previousStream.AtEnd = true;
         _previousStream       = null;
         SeekToNextPart();
     }
 }
 public Stream GetNextPart()
 {
     if (AtEndBoundary)
         return null;
     SkipPreamble();
     if (AtEndBoundary)
         return null;
     TerminateExistingStream();
     return _previousStream = new BoundarySubStream(this);
 }
 public Stream GetNextPart()
 {
     if (AtEndBoundary)
     {
         return(null);
     }
     SkipPreamble();
     if (AtEndBoundary)
     {
         return(null);
     }
     TerminateExistingStream();
     return(_previousStream = new BoundarySubStream(this));
 }
        public Stream GetNextPart()
        {
            if (this.AtEndBoundary)
            {
                return null;
            }

            this.SkipPreamble();

            if (this.AtEndBoundary)
            {
                return null;
            }

            this.TerminateExistingStream();

            return this.previousStream = new BoundarySubStream(this);
        }
 private void TerminateExistingStream()
 {
     this.Log.WriteDebug("TerminateExistingStream(), previous stream was " + this.previousStream == null ? "null" : "not null");
     
     if (this.previousStream != null)
     {
         this.previousStream.AtEnd = true;
         this.previousStream = null;
         this.SeekToNextPart();
     }
 }
 void TerminateExistingStream()
 {
     Log.WriteDebug("TerminateExistingStream(), previous stream was " + _previousStream == null ? "null" : "not null");
     if (_previousStream != null)
     {
         _previousStream.AtEnd = true;
         _previousStream = null;
         SeekToNextPart();
     }
 }