public PageBlobReadStream(CloudPageBlob blob) { _blob = blob; if (!_blob.Exists()) throw new ArgumentException(); _reader = new BinaryReader(_blob.OpenRead()); }
public PageBlobAppendStream(CloudPageBlob blob) { _blob = blob; if (blob == null) throw new ArgumentNullException("blob"); _reader = new BinaryReader(_blob.OpenRead()); if (!blob.Exists()) { _blob.Create(0); _lastPageIndex = -1; return; } _blobLength = _blob.Properties.Length; _lastPageIndex = (_blobLength / PageSize) - 1; }