From 04b8976ca565ce95cf32a58c8725843618724383 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 8 Jun 2020 16:25:38 -0700 Subject: Make commands async and internal processes cancelable --- src/WixToolset.Core/CommandLine/DecompileCommand.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/WixToolset.Core/CommandLine/DecompileCommand.cs') diff --git a/src/WixToolset.Core/CommandLine/DecompileCommand.cs b/src/WixToolset.Core/CommandLine/DecompileCommand.cs index 0e21a4f4..1e11ae52 100644 --- a/src/WixToolset.Core/CommandLine/DecompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/DecompileCommand.cs @@ -4,6 +4,8 @@ namespace WixToolset.Core.CommandLine { using System; using System.IO; + using System.Threading; + using System.Threading.Tasks; using System.Xml.Linq; using WixToolset.Data; using WixToolset.Extensibility; @@ -29,12 +31,12 @@ namespace WixToolset.Core.CommandLine public IMessaging Messaging { get; } - public int Execute() + public Task ExecuteAsync(CancellationToken _) { if (this.commandLine.ShowHelp) { Console.WriteLine("TODO: Show decompile command help"); - return -1; + return Task.FromResult(-1); } var context = this.ServiceProvider.GetService(); @@ -61,10 +63,10 @@ namespace WixToolset.Core.CommandLine if (this.Messaging.EncounteredError) { - return 1; + return Task.FromResult(1); } - return 0; + return Task.FromResult(0); } public bool TryParseArgument(ICommandLineParser parser, string argument) -- cgit v1.2.3-55-g6feb