diff options
author | Rob Mensching <rob@firegiant.com> | 2018-11-02 23:43:19 -0700 |
---|---|---|
committer | Rob Mensching <rob@robmensching.com> | 2018-11-03 00:22:34 -0700 |
commit | 3d49b0591a6fa2dc88c8df8915959959f81f4471 (patch) | |
tree | d1e8f06ad4bc5fada76ea105feb7be9a0c61f9fe /src/WixToolset.Core | |
parent | 822d917960cbd35f506598af4baa6a20ad4b447e (diff) | |
download | wix-3d49b0591a6fa2dc88c8df8915959959f81f4471.tar.gz wix-3d49b0591a6fa2dc88c8df8915959959f81f4471.tar.bz2 wix-3d49b0591a6fa2dc88c8df8915959959f81f4471.zip |
Update to DecompileResult move to XDocument
Fixes wixtoolset/issues#5896
Diffstat (limited to 'src/WixToolset.Core')
-rw-r--r-- | src/WixToolset.Core/CommandLine/DecompileCommand.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/WixToolset.Core/CommandLine/DecompileCommand.cs b/src/WixToolset.Core/CommandLine/DecompileCommand.cs index 87cead80..3aa750c8 100644 --- a/src/WixToolset.Core/CommandLine/DecompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/DecompileCommand.cs | |||
@@ -3,8 +3,8 @@ | |||
3 | namespace WixToolset.Core.CommandLine | 3 | namespace WixToolset.Core.CommandLine |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | ||
7 | using System.IO; | 6 | using System.IO; |
7 | using System.Xml.Linq; | ||
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | using WixToolset.Extensibility; | 9 | using WixToolset.Extensibility; |
10 | using WixToolset.Extensibility.Data; | 10 | using WixToolset.Extensibility.Data; |
@@ -29,10 +29,6 @@ namespace WixToolset.Core.CommandLine | |||
29 | 29 | ||
30 | public IMessaging Messaging { get; } | 30 | public IMessaging Messaging { get; } |
31 | 31 | ||
32 | private IEnumerable<SourceFile> SourceFiles { get; } | ||
33 | |||
34 | private string OutputPath { get; } | ||
35 | |||
36 | public int Execute() | 32 | public int Execute() |
37 | { | 33 | { |
38 | if (this.commandLine.ShowHelp) | 34 | if (this.commandLine.ShowHelp) |
@@ -52,6 +48,11 @@ namespace WixToolset.Core.CommandLine | |||
52 | { | 48 | { |
53 | var decompiler = this.ServiceProvider.GetService<IDecompiler>(); | 49 | var decompiler = this.ServiceProvider.GetService<IDecompiler>(); |
54 | var result = decompiler.Decompile(context); | 50 | var result = decompiler.Decompile(context); |
51 | |||
52 | if (!this.Messaging.EncounteredError) | ||
53 | { | ||
54 | result.Document.Save(context.OutputPath, SaveOptions.OmitDuplicateNamespaces); | ||
55 | } | ||
55 | } | 56 | } |
56 | catch (WixException e) | 57 | catch (WixException e) |
57 | { | 58 | { |