Exemplo n.º 1
0
            public Stream OpenRead()
            {
                if (fileStream == null)
                {
                    return(BlobStore.OpenRead(this.Path));
                }

                int len;

                if (Length != null)
                {
                    len = Length.Value;
                }
                else
                {
                    throw new Exception("Length should've been available, since fileStream is not null.");
                }

                fileStream.Seek(DataStartOffset, SeekOrigin.Begin);

                var f = new BlobStream(fileStream, len, true);

                fileStream = null;
                return(f);
            }
Exemplo n.º 2
0
 public Stream OpenRead()
 {
     if (fileStream == null)
     {
         return BlobStore.OpenRead(this.Path);
     }
     fileStream.Seek(DataStartOffset, SeekOrigin.Begin);
     var f = new BlobStream(fileStream, Length, true);
     fileStream = null;
     return f;
 }