From 822d917960cbd35f506598af4baa6a20ad4b447e Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 24 Oct 2018 21:06:51 -0700 Subject: Re-introduce "decompile" to backend --- src/WixToolset.Core.WindowsInstaller/MsiBackend.cs | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller/MsiBackend.cs') diff --git a/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs b/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs index 579977fe..b633ea31 100644 --- a/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs +++ b/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core.WindowsInstaller { @@ -38,9 +38,26 @@ namespace WixToolset.Core.WindowsInstaller return result; } - public BindResult Decompile(IDecompileContext context) + public DecompileResult Decompile(IDecompileContext context) { - throw new NotImplementedException(); + var extensionManager = context.ServiceProvider.GetService(); + + var backendExtensions = extensionManager.Create(); + + foreach (var extension in backendExtensions) + { + extension.PreBackendDecompile(context); + } + + var command = new DecompileMsiOrMsmCommand(context, backendExtensions); + var result = command.Execute(); + + foreach (var extension in backendExtensions) + { + extension.PostBackendDecompile(result); + } + + return result; } public bool Inscribe(IInscribeContext context) -- cgit v1.2.3-55-g6feb