Ejemplo n.º 1
0
 public static void ValidateAppendBlockArguments(IListBlobObject blob, long contentLength, long?conditionalMaxBlobSize, long?conditionalAppendBlockPosition)
 {
     if (blob.Snapshot != StorageStampHelpers.RootBlobSnapshotVersion)
     {
         throw new XStoreArgumentException("This operation is only supported on the root blob.");
     }
     if (contentLength <= (long)0)
     {
         throw new ArgumentOutOfRangeException("contentLength", "contentLength must be > 0");
     }
     if (contentLength > (long)4194304)
     {
         throw new BlobContentTooLargeException(new long?((long)4194304), "The block being appended exceeds the maximum block size.", null);
     }
     if (conditionalMaxBlobSize.HasValue && conditionalMaxBlobSize.Value <= (long)0)
     {
         throw new XStoreArgumentOutOfRangeException("maxBlobSize", "maxBlobSize must be > 0.");
     }
     if (conditionalAppendBlockPosition.HasValue)
     {
         long value = conditionalAppendBlockPosition.Value;
         if (value < (long)0 || value >= 209715200000L)
         {
             throw new XStoreArgumentOutOfRangeException("appendPos", "appendPos must be >= 0 and < XBLOB_MAX_APPEND_BLOCK_BLOB_SIZE");
         }
     }
 }
Ejemplo n.º 2
0
        IListBlobObject Microsoft.Cis.Services.Nephos.Common.Storage.IBlobContainer.CreateAppendBlobInstance(string blobName, DateTime snapshot, BlobServiceVersion version)
        {
            IListBlobObject listBlobObject;

            try
            {
                IListBlobObject listBlobObject1 = this.InternalContainer.CreateAppendBlobInstance(blobName, snapshot, version);
                listBlobObject = new ListBlobObject(listBlobObject1);
            }
            catch (Exception exception)
            {
                StorageStamp.TranslateException(exception);
                throw;
            }
            return(listBlobObject);
        }
Ejemplo n.º 3
0
 public ListBlobObject(IListBlobObject blob) : base(blob)
 {
 }