diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-11 16:03:19 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-12 12:46:21 +1000 |
| commit | df69d4172d3117d8b66ba51fa5ae7f4be538700d (patch) | |
| tree | 962a380e4d46e2bdff056e94a238819caa4e053e /src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs | |
| parent | bf187ab399db33b40fc3de8ac9b1e2a82cc47a19 (diff) | |
| download | wix-df69d4172d3117d8b66ba51fa5ae7f4be538700d.tar.gz wix-df69d4172d3117d8b66ba51fa5ae7f4be538700d.tar.bz2 wix-df69d4172d3117d8b66ba51fa5ae7f4be538700d.zip | |
Move table definitions from Core to Data.
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs deleted file mode 100644 index 33f1ba04..00000000 --- a/src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 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.Core.WindowsInstaller | ||
| 4 | { | ||
| 5 | using System.Reflection; | ||
| 6 | using System.Xml; | ||
| 7 | using WixToolset.Data.WindowsInstaller; | ||
| 8 | |||
| 9 | /// <summary> | ||
| 10 | /// Represents the Windows Installer standard objects. | ||
| 11 | /// </summary> | ||
| 12 | internal static class WindowsInstallerStandardInternal | ||
| 13 | { | ||
| 14 | private static readonly object lockObject = new object(); | ||
| 15 | |||
| 16 | private static TableDefinitionCollection tableDefinitions; | ||
| 17 | |||
| 18 | /// <summary> | ||
| 19 | /// Gets the table definitions stored in this assembly. | ||
| 20 | /// </summary> | ||
| 21 | /// <returns>Table definition collection for tables stored in this assembly.</returns> | ||
| 22 | public static TableDefinitionCollection GetTableDefinitions() | ||
| 23 | { | ||
| 24 | // TODO: make the data static data structures instead of parsing an XML file and consider | ||
| 25 | // moving it all to WixToolset.Data.WindowsInstallerStandard class. | ||
| 26 | lock (lockObject) | ||
| 27 | { | ||
| 28 | if (null == WindowsInstallerStandardInternal.tableDefinitions) | ||
| 29 | { | ||
| 30 | using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Core.WindowsInstaller.Data.tables.xml"))) | ||
| 31 | { | ||
| 32 | WindowsInstallerStandardInternal.tableDefinitions = TableDefinitionCollection.Load(reader); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 37 | return WindowsInstallerStandardInternal.tableDefinitions; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | } | ||
