csharp-sdk-upm/Storage/Source/Internal/Command/IAVCommandRunner.cs

25 lines
996 B
C#

using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace LeanCloud.Storage.Internal
{
public interface IAVCommandRunner
{
/// <summary>
/// Executes <see cref="AVCommand"/> and convert the result into Dictionary.
/// </summary>
/// <param name="command">The command to be run.</param>
/// <param name="uploadProgress">Upload progress callback.</param>
/// <param name="downloadProgress">Download progress callback.</param>
/// <param name="cancellationToken">The cancellation token for the request.</param>
/// <returns></returns>
Task<Tuple<HttpStatusCode, IDictionary<string, object>>> RunCommandAsync(AVCommand command,
IProgress<AVUploadProgressEventArgs> uploadProgress = null,
IProgress<AVDownloadProgressEventArgs> downloadProgress = null,
CancellationToken cancellationToken = default);
}
}