|
|
@ -21,9 +21,27 @@ public class PackageModificationRunner : IPackageModificationRunner |
|
|
|
foreach (var step in steps) |
|
|
|
foreach (var step in steps) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CurrentStep = step; |
|
|
|
CurrentStep = step; |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
await step.ExecuteAsync(progress).ConfigureAwait(false); |
|
|
|
await step.ExecuteAsync(progress).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
progress.Report( |
|
|
|
|
|
|
|
new ProgressReport( |
|
|
|
|
|
|
|
1f, |
|
|
|
|
|
|
|
title: "Error modifying package", |
|
|
|
|
|
|
|
message: $"Error: {e}", |
|
|
|
|
|
|
|
isIndeterminate: false |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
Failed = true; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Failed) |
|
|
|
|
|
|
|
{ |
|
|
|
progress.Report( |
|
|
|
progress.Report( |
|
|
|
new ProgressReport( |
|
|
|
new ProgressReport( |
|
|
|
1f, |
|
|
|
1f, |
|
|
@ -31,6 +49,7 @@ public class PackageModificationRunner : IPackageModificationRunner |
|
|
|
isIndeterminate: false |
|
|
|
isIndeterminate: false |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IsRunning = false; |
|
|
|
IsRunning = false; |
|
|
|
} |
|
|
|
} |
|
|
@ -39,6 +58,7 @@ public class PackageModificationRunner : IPackageModificationRunner |
|
|
|
public bool ShowDialogOnStart { get; init; } |
|
|
|
public bool ShowDialogOnStart { get; init; } |
|
|
|
|
|
|
|
|
|
|
|
public bool IsRunning { get; set; } |
|
|
|
public bool IsRunning { get; set; } |
|
|
|
|
|
|
|
public bool Failed { get; set; } |
|
|
|
public ProgressReport CurrentProgress { get; set; } |
|
|
|
public ProgressReport CurrentProgress { get; set; } |
|
|
|
public IPackageStep? CurrentStep { get; set; } |
|
|
|
public IPackageStep? CurrentStep { get; set; } |
|
|
|
public List<string> ConsoleOutput { get; } = new(); |
|
|
|
public List<string> ConsoleOutput { get; } = new(); |
|
|
|