aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/MsiBackend.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/MsiBackend.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs b/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs
new file mode 100644
index 00000000..716ea000
--- /dev/null
+++ b/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs
@@ -0,0 +1,36 @@
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
3namespace WixToolset.Core.WindowsInstaller
4{
5 using WixToolset.Core.WindowsInstaller.Bind;
6 using WixToolset.Core.WindowsInstaller.Inscribe;
7 using WixToolset.Core.WindowsInstaller.Unbind;
8 using WixToolset.Data;
9 using WixToolset.Data.Bind;
10 using WixToolset.Extensibility;
11
12 internal class MsiBackend : IBackend
13 {
14 public BindResult Bind(IBindContext context)
15 {
16 var validator = Validator.CreateFromContext(context, "darice.cub");
17
18 var command = new BindDatabaseCommand(context, validator);
19 command.Execute();
20
21 return new BindResult(command.FileTransfers, command.ContentFilePaths);
22 }
23
24 public bool Inscribe(IInscribeContext context)
25 {
26 var command = new InscribeMsiPackageCommand(context);
27 return command.Execute();
28 }
29
30 public Output Unbind(IUnbindContext context)
31 {
32 var command = new UnbindMsiOrMsmCommand(context);
33 return command.Execute();
34 }
35 }
36}