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