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