private GetCanonicalName ( bool ignoreSnapshotTime ) : string | ||
ignoreSnapshotTime | bool | Indicates if the snapshot time is ignored. |
return | string |
/// <summary> /// Implementation of the CopyFromBlob method. /// </summary> /// <param name="source">The source blob.</param> /// <param name="options">An object that specifies any additional options for the request.</param> /// <returns>A <see cref="TaskSequence"/> that copies the blob.</returns> private TaskSequence CopyFromBlobImpl(CloudBlob source, BlobRequestOptions options) { CommonUtils.AssertNotNull("options", options); string sourceBlobUri = source.GetCanonicalName(false); ConditionHeaderKind header; string value; AccessCondition.GetSourceConditions(options.CopySourceAccessCondition, out header, out value); var webRequest = ProtocolHelper.GetWebRequest( this.ServiceClient, options, (timeout) => BlobRequest.CopyFrom(this.TransformedAddress, timeout, sourceBlobUri, this.SnapshotTime, header, value, null)); BlobRequest.AddMetadata(webRequest, this.Metadata); this.ServiceClient.Credentials.SignRequest(webRequest); var copyTask = webRequest.GetResponseAsyncWithTimeout(this.ServiceClient, options.Timeout); yield return copyTask; // Parse the response using (HttpWebResponse webResponse = copyTask.Result as HttpWebResponse) { this.ParseSizeAndLastModified(webResponse); } }