aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/MstBackend.cs
blob: 2cb7da89f36c41c2abc88e62db229f939e8daa35 (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
36
37
// 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 System;
    using WixToolset.Core.WindowsInstaller.Databases;
    using WixToolset.Core.WindowsInstaller.Unbind;
    using WixToolset.Data;
    using WixToolset.Data.Bind;
    using WixToolset.Extensibility;

    internal class MstBackend : IBackend
    {
        public BindResult Bind(IBindContext context)
        {
            var command = new BindTransformCommand();
            command.Extensions = context.Extensions;
            command.TempFilesLocation = context.IntermediateFolder;
            command.Transform = context.IntermediateRepresentation;
            command.OutputPath = context.OutputPath;
            command.Execute();

            return new BindResult(Array.Empty<FileTransfer>(), Array.Empty<string>());
        }

        public bool Inscribe(IInscribeContext context)
        {
            throw new NotImplementedException();
        }

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