aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/MsmqWindowsInstallerBackendExtension.cs
blob: d7e5c4e1b6bb3f71620535be74541f599d196787 (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
// 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.Msmq
{
    using System.Linq;
    using System.Xml;
    using WixToolset.Data.WindowsInstaller;
    using WixToolset.Extensibility;

    public class MsmqWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
    {
        public MsmqWindowsInstallerBackendBinderExtension()
        {

        }

        private static readonly TableDefinition[] Tables = LoadTables();

        protected override TableDefinition[] TableDefinitionsForTuples => Tables;

        private static TableDefinition[] LoadTables()
        {
            using (var resourceStream = typeof(MsmqWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Msmq.tables.xml"))
            using (var reader = XmlReader.Create(resourceStream))
            {
                var tables = TableDefinitionCollection.Load(reader);
                return tables.ToArray();
            }
        }
    }
}