Exemplo n.º 1
0
        private IEnumerator <IAsyncResult> CreateContainerImpl(DateTime?expiryTime, byte[] serviceMetadata, byte[] applicationMetadata, AsyncIteratorContext <NoResults> context)
        {
            IAsyncResult           asyncResult;
            IStringDataEventStream verboseDebug = Logger <IRestProtocolHeadLogger> .Instance.VerboseDebug;

            object[] objArray = new object[] { expiryTime, serviceMetadata, applicationMetadata, base.Timeout };
            verboseDebug.Log("CreateContainerImpl({0},{1},{2},{3})", objArray);
            try
            {
                asyncResult = this.InternalContainer.BeginCreateContainer(StorageStampHelpers.AdjustNullableDatetimeRange(expiryTime), serviceMetadata, applicationMetadata, context.GetResumeCallback(), context.GetResumeState("BaseBlobContainer.CreateContainerImpl"));
            }
            catch (Exception exception)
            {
                StorageStamp.TranslateException(exception);
                throw;
            }
            yield return(asyncResult);

            try
            {
                this.InternalContainer.EndCreateContainer(asyncResult);
            }
            catch (Exception exception1)
            {
                StorageStamp.TranslateException(exception1);
                throw;
            }
        }
Exemplo n.º 2
0
 public static BlobObjectCondition Convert(IBlobObjectCondition condition)
 {
     if (condition == null)
     {
         return(null);
     }
     return(new BlobObjectCondition(condition.IncludeDisabledContainers, condition.IncludeExpiredBlobs, StorageStampHelpers.AdjustNullableDatetimeRange(condition.IfModifiedSinceTime), StorageStampHelpers.AdjustNullableDatetimeRange(condition.IfNotModifiedSinceTime), StorageStampHelpers.AdjustDateTimeRange(condition.IfLastModificationTimeMatch), StorageStampHelpers.AdjustDateTimeRange(condition.IfLastModificationTimeMismatch), condition.UpdateOptions, condition.LeaseId, condition.IsFetchingMetadata, condition.IsIncludingSnapshots, condition.IsIncludingPageBlobs, condition.IsIncludingAppendBlobs, condition.IsIncludingUncommittedBlobs, condition.IsDeletingOnlySnapshots, condition.IsRequiringNoSnapshots, condition.IsSkippingLastModificationTimeUpdate, condition.SequenceNumberOperator, condition.SequenceNumber, condition.RequiredBlobType, condition.IsMultipleConditionalHeaderEnabled, condition.IsCopyOperationOnAppendBlobsAllowed, condition.IsRequiringLeaseIfNotModifiedSince, condition.IsDiskMountStateConditionRequired, condition.ExcludeSoftDeletedBlobs, condition.EnsureBlobIsAlreadySoftDeleted, condition.IsOperationAllowedOnArchivedBlobs, condition.SkipLeaseCheck, condition.InternalArchiveBlobLMT, condition.InternalArchiveBlobGenerationId, condition.InternalArchiveRequestId, condition.IncludeSoftDeletedBlobsOnly));
 }
Exemplo n.º 3
0
 public static ContainerCondition Convert(IContainerCondition condition)
 {
     if (condition == null)
     {
         return(null);
     }
     return(new ContainerCondition(condition.IncludeDisabledContainers, condition.IncludeExpiredContainers, condition.IncludeSnapshots, StorageStampHelpers.AdjustNullableDatetimeRange(condition.IfModifiedSinceTime), StorageStampHelpers.AdjustNullableDatetimeRange(condition.IfNotModifiedSinceTime), condition.SnapshotTimestamp, condition.IsRequiringNoSnapshots, condition.IsDeletingOnlySnapshots, condition.LeaseId));
 }
Exemplo n.º 4
0
        private IEnumerator <IAsyncResult> CreateTableContainerImpl(string tableName, DateTime?expiryTime, byte[] serviceMetadata, byte[] applicationMetadata, AsyncIteratorContext <ITableContainer> context)
        {
            IAsyncResult           asyncResult;
            IStringDataEventStream verboseDebug = Logger <IRestProtocolHeadLogger> .Instance.VerboseDebug;

            object[] objArray = new object[] { tableName, expiryTime, serviceMetadata, applicationMetadata, this.Timeout };
            verboseDebug.Log("CreateTableContainerImpl({0},{1},{2},{3},{4})", objArray);
            try
            {
                asyncResult = this.internalAccount.BeginCreateTableContainer(tableName, StorageStampHelpers.AdjustNullableDatetimeRange(expiryTime), serviceMetadata, applicationMetadata, context.GetResumeCallback(), context.GetResumeState("StorageAccount.CreateTableContainerImpl"));
            }
            catch (Exception exception)
            {
                StorageStamp.TranslateException(exception);
                throw;
            }
            yield return(asyncResult);

            try
            {
                ITableContainer tableContainer = this.internalAccount.EndCreateTableContainer(asyncResult);
                context.ResultData = new TableContainer(tableContainer);
            }
            catch (Exception exception1)
            {
                StorageStamp.TranslateException(exception1);
                throw;
            }
        }
Exemplo n.º 5
0
 public void JustDecompileGenerated_set_IfNotModifiedSinceTime(DateTime?value)
 {
     this.ifNotModifiedSinceTime = StorageStampHelpers.AdjustNullableDatetimeRange(value);
 }
Exemplo n.º 6
0
        private IEnumerator <IAsyncResult> SynchronousCopyBlobImpl(string sourceAccount, IBlobObject sourceBlob, DateTime?expiryTime, byte[] applicationMetadata, OverwriteOption overwriteOption, IBlobObjectCondition sourceCondition, IBlobObjectCondition destinationCondition, UriString copySource, AsyncIteratorContext <CopyBlobOperationInfo> context)
        {
            IAsyncResult asyncResult;

            try
            {
                asyncResult = this.blob.BeginSynchronousCopyBlob(sourceAccount, ((BaseBlobObject)sourceBlob).blob, StorageStampHelpers.AdjustNullableDatetimeRange(expiryTime), applicationMetadata, overwriteOption, Helpers.Convert(sourceCondition), Helpers.Convert(destinationCondition), copySource, context.GetResumeCallback(), context.GetResumeState("IBlobObject.BeginSynchronousCopyBlob"));
            }
            catch (Exception exception)
            {
                StorageStamp.TranslateException(exception);
                throw;
            }
            yield return(asyncResult);

            CopyBlobOperationInfo copyBlobOperationInfo = null;

            try
            {
                copyBlobOperationInfo = this.blob.EndSynchronousCopyBlob(asyncResult);
            }
            catch (Exception exception1)
            {
                StorageStamp.TranslateException(exception1);
                throw;
            }
            context.ResultData = copyBlobOperationInfo;
        }