Пример #1
0
        public IAsyncResult BeginSetProperties(string contentType, long?maxBlobSize, NameValueCollection serviceMetadata, ServiceMetadataUpdatePolicy serviceMetadataPolicy, string[] serviceMetadataPolicyArguments, NameValueCollection applicationMetadata, ISequenceNumberUpdate sequenceNumberUpdate, IBlobObjectCondition condition, AsyncCallback callback, object state)
        {
            AsyncIteratorContext <NoResults> asyncIteratorContext = new AsyncIteratorContext <NoResults>("RealBlobObject.SetProperties", callback, state);

            asyncIteratorContext.Begin(this.SetPropertiesImpl(contentType, maxBlobSize, serviceMetadata, serviceMetadataPolicy, serviceMetadataPolicyArguments, applicationMetadata, sequenceNumberUpdate, condition, asyncIteratorContext));
            return(asyncIteratorContext);
        }
Пример #2
0
        private IEnumerator <IAsyncResult> SetPropertiesImpl(string contentType, long?maxBlobSize, NameValueCollection serviceMetadata, ServiceMetadataUpdatePolicy serviceMetadataPolicy, string[] serviceMetadataPolicyArguments, NameValueCollection applicationMetadata, ISequenceNumberUpdate sequenceNumberUpdate, IBlobObjectCondition condition, AsyncIteratorContext <NoResults> context)
        {
            IAsyncResult asyncResult;

            try
            {
                asyncResult = this.blob.BeginSetProperties(contentType, maxBlobSize, serviceMetadata, serviceMetadataPolicy, serviceMetadataPolicyArguments, applicationMetadata, sequenceNumberUpdate, Helpers.Convert(condition), context.GetResumeCallback(), context.GetResumeState("BaseBlobObject.SetPropertiesImpl"));
            }
            catch (Exception exception)
            {
                StorageStamp.TranslateException(exception);
                throw;
            }
            yield return(asyncResult);

            try
            {
                this.blob.EndSetProperties(asyncResult);
            }
            catch (Exception exception1)
            {
                StorageStamp.TranslateException(exception1);
                throw;
            }
        }