diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-06 09:06:53 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-06 14:19:01 +1000 |
commit | 2df59141a12979c9869ad2e62d01e9f7432e2f7c (patch) | |
tree | 977cb96903815bd67654dd255927ba911e1774c3 /src/wixext/SqlWindowsInstallerBackendExtension.cs | |
parent | 2b82ad224e45a6f9d052ae892ecbf85e436b0bdf (diff) | |
download | wix-2df59141a12979c9869ad2e62d01e9f7432e2f7c.tar.gz wix-2df59141a12979c9869ad2e62d01e9f7432e2f7c.tar.bz2 wix-2df59141a12979c9869ad2e62d01e9f7432e2f7c.zip |
Modernize SqlCompiler and tuples.
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 | } |