CopyCommand detail: speed

This commit is contained in:
2023-07-27 13:56:22 +02:00
parent 9171a3de54
commit bfa971f352
13 changed files with 143 additions and 43 deletions

View File

@@ -76,8 +76,12 @@ public class StreamCopyCommandHandler : ICommandHandler
await writer.WriteBytesAsync(dataRead);
await writer.FlushAsync();
currentProgress += dataRead.LongLength;
copyCommandContext.CurrentProgress?.SetProgress(currentProgress);
await copyCommandContext.UpdateProgress();
if (copyCommandContext.CurrentProgress is not null)
{
copyCommandContext.CurrentProgress.SetProgressSafe(currentProgress);
}
await copyCommandContext.UpdateProgressAsync();
}
} while (dataRead.Length > 0);
}