/// <summary>
 /// Returns a new <see cref="IAsset"/> with the files in <paramref name="folderPath"/>.
 /// </summary>
 /// <param name="context">The <see cref="CloudMediaContext"/> instance.</param>
 /// <param name="folderPath">The path to the folder with the files to upload to the new <see cref="IAsset"/>.</param>
 /// <param name="storageAccountName">The name of the Storage Account where to store the new <see cref="IAsset"/>.</param>
 /// <param name="options">The <see cref="AssetCreationOptions"/>.</param>
 /// <param name="uploadProgressChangedCallback">A callback to report upload progress of the files.</param>
 /// <returns>A new <see cref="IAsset"/> with the files in <paramref name="folderPath"/>.</returns>
 public static IAsset CreateAssetFromFolder(this CloudMediaContext context, string folderPath, string storageAccountName, AssetCreationOptions options, Action <IAssetFile, UploadProgressChangedEventArgs> uploadProgressChangedCallback)
 {
     using (Task <IAsset> task = context.CreateAssetFromFolderAsync(folderPath, storageAccountName, options, uploadProgressChangedCallback, CancellationToken.None))
     {
         return(task.Result);
     }
 }
 /// <summary>
 /// Returns a <see cref="System.Threading.Tasks.Task&lt;IAsset&gt;"/> instance for the new <see cref="IAsset"/>.
 /// </summary>
 /// <param name="context">The <see cref="CloudMediaContext"/> instance.</param>
 /// <param name="folderPath">The path to the folder with the files to upload to the new <see cref="IAsset"/>.</param>
 /// <param name="options">The <see cref="AssetCreationOptions"/>.</param>
 /// <param name="cancellationToken">The <see cref="System.Threading.CancellationToken"/> instance used for cancellation.</param>
 /// <returns>A <see cref="System.Threading.Tasks.Task&lt;IAsset&gt;"/> instance for new <see cref="IAsset"/>.</returns>
 public static Task <IAsset> CreateAssetFromFolderAsync(this CloudMediaContext context, string folderPath, AssetCreationOptions options, CancellationToken cancellationToken)
 {
     return(context.CreateAssetFromFolderAsync(folderPath, options, null, cancellationToken));
 }
 /// <summary>
 /// Returns a <see cref="System.Threading.Tasks.Task&lt;IAsset&gt;"/> instance for a new <see cref="IAsset"/> with the files in <paramref name="folderPath"/>.
 /// </summary>
 /// <param name="context">The <see cref="CloudMediaContext"/> instance.</param>
 /// <param name="folderPath">The path to the folder with the files to upload to the new <see cref="IAsset"/>.</param>
 /// <param name="options">The <see cref="AssetCreationOptions"/>.</param>
 /// <param name="uploadProgressChangedCallback">A callback to report upload progress of the files.</param>
 /// <param name="cancellationToken">The <see cref="System.Threading.CancellationToken"/> instance used for cancellation.</param>
 /// <returns>A <see cref="System.Threading.Tasks.Task&lt;IAsset&gt;"/> instance for a new <see cref="IAsset"/> with the files in <paramref name="folderPath"/>.</returns>
 public static Task <IAsset> CreateAssetFromFolderAsync(this CloudMediaContext context, string folderPath, AssetCreationOptions options, Action <IAssetFile, UploadProgressChangedEventArgs> uploadProgressChangedCallback, CancellationToken cancellationToken)
 {
     return(context.CreateAssetFromFolderAsync(folderPath, null, options, uploadProgressChangedCallback, cancellationToken));
 }