Skip to content

Commit

Permalink
UploadProgressArgs -> UploadProgressEventArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
f2calv committed Sep 27, 2024
1 parent 4eec6c4 commit be77f4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CasCap.Models;

public class UploadProgressArgs(string fileName, long totalBytes, int batchIndex, long uploadedBytes, long batchSize) : EventArgs
public class UploadProgressEventArgs(string fileName, long totalBytes, int batchIndex, long uploadedBytes, long batchSize) : EventArgs
{
public string fileName { get; } = fileName;
public long totalBytes { get; } = totalBytes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ HttpClient client
protected virtual void RaisePagingEvent(PagingEventArgs args) => PagingEvent?.Invoke(this, args);
public event EventHandler<PagingEventArgs>? PagingEvent;

protected virtual void RaiseUploadProgressEvent(UploadProgressArgs args) => UploadProgressEvent?.Invoke(this, args);
public event EventHandler<UploadProgressArgs>? UploadProgressEvent;
protected virtual void RaiseUploadProgressEvent(UploadProgressEventArgs args) => UploadProgressEvent?.Invoke(this, args);
public event EventHandler<UploadProgressEventArgs>? UploadProgressEvent;

public static bool IsFileUploadable(string path) => IsFileUploadableByExtension(Path.GetExtension(path));

Expand Down Expand Up @@ -721,7 +721,7 @@ IAsyncEnumerable<MediaItem> _GetMediaItemsByFilterAsync(Filter filter, int maxPa
{
attemptCount = 0;//reset retry count
offset += bytes.Length;
RaiseUploadProgressEvent(new UploadProgressArgs(Path.GetFileName(path), size, batchIndex, offset, bytes.Length));
RaiseUploadProgressEvent(new UploadProgressEventArgs(Path.GetFileName(path), size, batchIndex, offset, bytes.Length));
batchIndex++;
//if (callback is not null)
// callback(bytes.Length);
Expand Down

0 comments on commit be77f4f

Please sign in to comment.