/// <summary> /// Gets the canonical name of the file, formatted as file/<account-name>/<share-name>/<directory-name>/<file-name>. /// <para>This is used by both Shared Access and Copy operations.</para> /// </summary> /// <returns>The canonical name of the file.</returns> private string GetCanonicalName() { string accountName = this.ServiceClient.Credentials.AccountName; string shareName = this.Share.Name; // Replace \ with / for uri compatibility when running under .net 4.5. string fileAndDirectoryName = NavigationHelper.GetFileAndDirectoryName(this.Uri, this.ServiceClient.UsePathStyleUris).Replace('\\', '/'); return(string.Format(CultureInfo.InvariantCulture, "/{0}/{1}/{2}/{3}", SR.File, accountName, shareName, fileAndDirectoryName)); }