public override void Write(byte[] value)
		{
			try
			{
				_lock.Wait();
				using (var lease = new RenewingBlobLease(_blob))
				{
					var offset = 0;
					while (offset < value.Length)
					{
						var blockId = Convert.ToBase64String(Guid.NewGuid().ToByteArray());
						var remaining = value.Length - offset;
						var length = remaining < MaxBufferSize ? remaining : MaxBufferSize;
						using (var stream = new MemoryStream(value, offset, length))
						{
							_blob.PutBlock(blockId, stream, null, AccessCondition.GenerateLeaseCondition(lease.Id));
							offset += (int) stream.Length;
						}
						_blockIds.Add(blockId);
					}
					Flush(lease);
				}
			}
			finally
			{
				_lock.Release();
			}

			AfterWrite();
		}
		private void Flush(RenewingBlobLease lease)
		{
			if (_blockIds.Any())
			{
				var blockList = _blob.DownloadBlockList(BlockListingFilter.Committed,
					AccessCondition.GenerateLeaseCondition(lease.Id));
				var blockIds = blockList.Select(x => x.Name).ToList();
				_blockIds.AddRange(blockIds);
				_blob.PutBlockList(blockIds, AccessCondition.GenerateLeaseCondition(lease.Id));
				_blockIds.Clear();
			}
		}
		public override void Flush()
		{
			try
			{
				_lock.Wait();
				using (var lease = new RenewingBlobLease(_blob))
				{
					Flush(lease);
				}
			}
			finally
			{
				_lock.Release();
			}

			AfterFlush();
		}