mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Refactor: Use delegates to report progress and status.
This commit is contained in:
@@ -41,6 +41,9 @@ namespace DiscImageChef.Commands
|
||||
public static void doBenchmark(BenchmarkOptions options)
|
||||
{
|
||||
Dictionary<string, double> checksumTimes = new Dictionary<string, double>();
|
||||
Core.Benchmark.InitProgressEvent += Progress.InitProgress;
|
||||
Core.Benchmark.UpdateProgressEvent += Progress.UpdateProgress;
|
||||
Core.Benchmark.EndProgressEvent += Progress.EndProgress;
|
||||
|
||||
BenchmarkResults results = Core.Benchmark.Do(options.BufferSize * 1024 * 1024, options.BlockSize);
|
||||
|
||||
|
||||
@@ -93,6 +93,14 @@ namespace DiscImageChef.Commands
|
||||
Core.Statistics.AddMediaFormat(_imageFormat.GetImageFormat());
|
||||
Core.Statistics.AddFilter(inputFilter.Name);
|
||||
|
||||
Sidecar.InitProgressEvent += Progress.InitProgress;
|
||||
Sidecar.UpdateProgressEvent += Progress.UpdateProgress;
|
||||
Sidecar.EndProgressEvent += Progress.EndProgress;
|
||||
Sidecar.InitProgressEvent2 += Progress.InitProgress2;
|
||||
Sidecar.UpdateProgressEvent2 += Progress.UpdateProgress2;
|
||||
Sidecar.EndProgressEvent2 += Progress.EndProgress2;
|
||||
Sidecar.UpdateStatusEvent += Progress.UpdateStatus;
|
||||
|
||||
CICMMetadataType sidecar = Sidecar.Create(_imageFormat, options.InputFile);
|
||||
|
||||
DicConsole.WriteLine("Writing metadata sidecar");
|
||||
|
||||
Reference in New Issue
Block a user