diff options
| author | Rob Mensching <rob@firegiant.com> | 2020-06-08 16:25:38 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2020-06-08 16:37:14 -0700 |
| commit | 04b8976ca565ce95cf32a58c8725843618724383 (patch) | |
| tree | 72cf07a394f193a49afcba9bac89647e3b0a0922 /src/WixToolset.Core/CommandLine/CompileCommand.cs | |
| parent | 3fb889ab7aa3cb0dfae23e0379e28552e919ad72 (diff) | |
| download | wix-04b8976ca565ce95cf32a58c8725843618724383.tar.gz wix-04b8976ca565ce95cf32a58c8725843618724383.tar.bz2 wix-04b8976ca565ce95cf32a58c8725843618724383.zip | |
Make commands async and internal processes cancelable
Diffstat (limited to 'src/WixToolset.Core/CommandLine/CompileCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/CommandLine/CompileCommand.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/WixToolset.Core/CommandLine/CompileCommand.cs b/src/WixToolset.Core/CommandLine/CompileCommand.cs index 67756947..d16c7a46 100644 --- a/src/WixToolset.Core/CommandLine/CompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/CompileCommand.cs | |||
| @@ -4,7 +4,8 @@ namespace WixToolset.Core.CommandLine | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.Xml.Linq; | 7 | using System.Threading; |
| 8 | using System.Threading.Tasks; | ||
| 8 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 9 | using WixToolset.Extensibility; | 10 | using WixToolset.Extensibility; |
| 10 | using WixToolset.Extensibility.Data; | 11 | using WixToolset.Extensibility.Data; |
| @@ -47,12 +48,9 @@ namespace WixToolset.Core.CommandLine | |||
| 47 | 48 | ||
| 48 | public bool StopParsing => throw new NotImplementedException(); | 49 | public bool StopParsing => throw new NotImplementedException(); |
| 49 | 50 | ||
| 50 | public bool TryParseArgument(ICommandLineParser parseHelper, string argument) | 51 | public bool TryParseArgument(ICommandLineParser parseHelper, string argument) => throw new NotImplementedException(); |
| 51 | { | ||
| 52 | throw new NotImplementedException(); | ||
| 53 | } | ||
| 54 | 52 | ||
| 55 | public int Execute() | 53 | public Task<int> ExecuteAsync(CancellationToken _) |
| 56 | { | 54 | { |
| 57 | foreach (var sourceFile in this.SourceFiles) | 55 | foreach (var sourceFile in this.SourceFiles) |
| 58 | { | 56 | { |
| @@ -91,7 +89,7 @@ namespace WixToolset.Core.CommandLine | |||
| 91 | intermediate.Save(sourceFile.OutputPath); | 89 | intermediate.Save(sourceFile.OutputPath); |
| 92 | } | 90 | } |
| 93 | 91 | ||
| 94 | return 0; | 92 | return Task.FromResult(0); |
| 95 | } | 93 | } |
| 96 | } | 94 | } |
| 97 | } | 95 | } |
