aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs
blob: 69d7ada0519793ec703121194347659a87c003b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 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
{
    using WixToolset.Core.WindowsInstaller.Bind;
    using WixToolset.Core.WindowsInstaller.Unbind;
    using WixToolset.Data;
    using WixToolset.Data.Bind;
    using WixToolset.Extensibility;
    using WixToolset.Extensibility.Services;

    internal class MsmBackend : IBackend
    {
        public BindResult Bind(IBindContext context)
        {
            var validator = Validator.CreateFromContext(context, "mergemod.cub");

            var command = new BindDatabaseCommand(context, validator);
            command.Execute();

            return new BindResult(command.FileTransfers, command.ContentFilePaths);
        }

        public bool Inscribe(IInscribeContext context)
        {
            return false;
        }

        public Output Unbind(IUnbindContext context)
        {
            var command = new UnbindMsiOrMsmCommand(context);
            return command.Execute();
        }
    }
}