diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-10-14 16:12:07 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-10-14 16:12:07 -0700 |
| commit | dbde9e7104b907bbbaea17e21247d8cafc8b3a4c (patch) | |
| tree | 0f5fbbb6fe12c6b2e5e622a0e18ce4c5b4eb2b96 /src/WixToolset.Core.WindowsInstaller/MsmBackend.cs | |
| parent | fbf986eb97f68396797a89fc7d40dec07b775440 (diff) | |
| download | wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.tar.gz wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.tar.bz2 wix-dbde9e7104b907bbbaea17e21247d8cafc8b3a4c.zip | |
Massive refactoring to introduce the concept of IBackend
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/MsmBackend.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/MsmBackend.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs b/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs new file mode 100644 index 00000000..268213d7 --- /dev/null +++ b/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.Core.WindowsInstaller | ||
| 4 | { | ||
| 5 | using WixToolset.Core.WindowsInstaller.Bind; | ||
| 6 | using WixToolset.Core.WindowsInstaller.Unbind; | ||
| 7 | using WixToolset.Data; | ||
| 8 | using WixToolset.Data.Bind; | ||
| 9 | using WixToolset.Extensibility; | ||
| 10 | |||
| 11 | internal class MsmBackend : IBackend | ||
| 12 | { | ||
| 13 | public BindResult Bind(IBindContext context) | ||
| 14 | { | ||
| 15 | var validator = Validator.CreateFromContext(context, "mergemod.cub"); | ||
| 16 | |||
| 17 | var command = new BindDatabaseCommand(context, validator); | ||
| 18 | command.Execute(); | ||
| 19 | |||
| 20 | return new BindResult(command.FileTransfers, command.ContentFilePaths); | ||
| 21 | } | ||
| 22 | |||
| 23 | public bool Inscribe(IInscribeContext context) | ||
| 24 | { | ||
| 25 | return false; | ||
| 26 | } | ||
| 27 | |||
| 28 | public Output Unbind(IUnbindContext context) | ||
| 29 | { | ||
| 30 | var command = new UnbindMsiOrMsmCommand(context); | ||
| 31 | return command.Execute(); | ||
| 32 | } | ||
| 33 | } | ||
| 34 | } | ||
