diff options
Diffstat (limited to 'src/wixext/SqlWindowsInstallerBackendExtension.cs')
| -rw-r--r-- | src/wixext/SqlWindowsInstallerBackendExtension.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/wixext/SqlWindowsInstallerBackendExtension.cs b/src/wixext/SqlWindowsInstallerBackendExtension.cs new file mode 100644 index 00000000..56bdbb1f --- /dev/null +++ b/src/wixext/SqlWindowsInstallerBackendExtension.cs | |||
| @@ -0,0 +1,31 @@ | |||
| 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.Sql | ||
| 4 | { | ||
| 5 | using System.Linq; | ||
| 6 | using System.Xml; | ||
| 7 | using WixToolset.Data.WindowsInstaller; | ||
| 8 | using WixToolset.Extensibility; | ||
| 9 | |||
| 10 | public class SqlWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension | ||
| 11 | { | ||
| 12 | public SqlWindowsInstallerBackendBinderExtension() | ||
| 13 | { | ||
| 14 | |||
| 15 | } | ||
| 16 | |||
| 17 | private static readonly TableDefinition[] Tables = LoadTables(); | ||
| 18 | |||
| 19 | protected override TableDefinition[] TableDefinitionsForTuples => Tables; | ||
| 20 | |||
| 21 | private static TableDefinition[] LoadTables() | ||
| 22 | { | ||
| 23 | using (var resourceStream = typeof(SqlWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Sql.tables.xml")) | ||
| 24 | using (var reader = XmlReader.Create(resourceStream)) | ||
| 25 | { | ||
| 26 | var tables = TableDefinitionCollection.Load(reader); | ||
| 27 | return tables.ToArray(); | ||
| 28 | } | ||
| 29 | } | ||
| 30 | } | ||
| 31 | } | ||
