aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-12-07 14:19:05 -0800
committerRob Mensching <rob@firegiant.com>2017-12-07 14:19:05 -0800
commit49f1209035aac1fcfad5dbbe25f7b2306d3be86c (patch)
tree6ce5921493eb751b6d89c3faf0ebdf64110cbb65 /src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs
parentb1e662bd480241ea914f0f3d6bd174d9ffd03f5f (diff)
downloadwix-49f1209035aac1fcfad5dbbe25f7b2306d3be86c.tar.gz
wix-49f1209035aac1fcfad5dbbe25f7b2306d3be86c.tar.bz2
wix-49f1209035aac1fcfad5dbbe25f7b2306d3be86c.zip
Support MSI backends creating custom tables and remove WixToolset.Data.WindowsInstaller
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs')
-rw-r--r--src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs
new file mode 100644
index 00000000..3b4721a6
--- /dev/null
+++ b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerStandardInternal.cs
@@ -0,0 +1,64 @@
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
3namespace WixToolset.Core.WindowsInstaller
4{
5 using System;
6 using System.Reflection;
7 using System.Xml;
8 using WixToolset.Core.WindowsInstaller.Rows;
9 using WixToolset.Data.WindowsInstaller;
10
11 /// <summary>
12 /// Represents the Windows Installer standard objects.
13 /// </summary>
14 internal static class WindowsInstallerStandardInternal
15 {
16 private static readonly object lockObject = new object();
17
18 private static TableDefinitionCollection tableDefinitions;
19 private static WixActionRowCollection standardActions;
20
21 /// <summary>
22 /// Gets the table definitions stored in this assembly.
23 /// </summary>
24 /// <returns>Table definition collection for tables stored in this assembly.</returns>
25 public static TableDefinitionCollection GetTableDefinitions()
26 {
27 lock (lockObject)
28 {
29 if (null == WindowsInstallerStandardInternal.tableDefinitions)
30 {
31 using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Core.WindowsInstaller.Data.tables.xml")))
32 {
33 WindowsInstallerStandardInternal.tableDefinitions = TableDefinitionCollection.Load(reader);
34 }
35 }
36 }
37
38 return WindowsInstallerStandardInternal.tableDefinitions;
39 }
40
41 /// <summary>
42 /// Gets the standard actions stored in this assembly.
43 /// </summary>
44 /// <returns>Collection of standard actions in this assembly.</returns>
45 public static WixActionRowCollection GetStandardActionRows()
46 {
47#if REVISIT_FOR_PATCHING
48 lock (lockObject)
49 {
50 if (null == WindowsInstallerStandardInternal.standardActions)
51 {
52 using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Core.WindowsInstaller.Data.actions.xml")))
53 {
54 WindowsInstallerStandardInternal.standardActions = WixActionRowCollection.Load(reader);
55 }
56 }
57 }
58
59 return WindowsInstallerStandardInternal.standardActions;
60#endif
61 throw new NotImplementedException();
62 }
63 }
64}