diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-10 10:17:26 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-10 10:21:39 +1000 |
commit | f92c72546326fb9b893bb7760691ee67ec7ab832 (patch) | |
tree | 405b3305fc4c08d25003cd601b3284bede89fa1a | |
parent | cff40371860cded7924b0010a26c9e8dc779cb0f (diff) | |
download | wix-f92c72546326fb9b893bb7760691ee67ec7ab832.tar.gz wix-f92c72546326fb9b893bb7760691ee67ec7ab832.tar.bz2 wix-f92c72546326fb9b893bb7760691ee67ec7ab832.zip |
Modernize HttpCompiler and tuples.
-rw-r--r-- | src/test/WixToolsetTest.Http/HttpExtensionFixture.cs | 4 | ||||
-rw-r--r-- | src/wixext/HttpCompiler.cs | 57 | ||||
-rw-r--r-- | src/wixext/HttpTableDefinitions.cs | 42 | ||||
-rw-r--r-- | src/wixext/HttpWindowsInstallerBackendBinderExtension.cs | 18 | ||||
-rw-r--r-- | src/wixext/Tuples/WixHttpUrlAceTuple.cs | 18 | ||||
-rw-r--r-- | src/wixext/Tuples/WixHttpUrlReservationTuple.cs | 18 | ||||
-rw-r--r-- | src/wixext/WixToolset.Http.wixext.csproj | 1 | ||||
-rw-r--r-- | src/wixext/tables.xml | 28 |
8 files changed, 86 insertions, 100 deletions
diff --git a/src/test/WixToolsetTest.Http/HttpExtensionFixture.cs b/src/test/WixToolsetTest.Http/HttpExtensionFixture.cs index 5658b657..947daec9 100644 --- a/src/test/WixToolsetTest.Http/HttpExtensionFixture.cs +++ b/src/test/WixToolsetTest.Http/HttpExtensionFixture.cs | |||
@@ -11,7 +11,7 @@ namespace WixToolsetTest.Http | |||
11 | public class HttpExtensionFixture | 11 | public class HttpExtensionFixture |
12 | { | 12 | { |
13 | [Fact] | 13 | [Fact] |
14 | public void CanBuildUsingMessageQueue() | 14 | public void CanBuildUsingUrlReservation() |
15 | { | 15 | { |
16 | var folder = TestData.Get(@"TestData\UsingUrlReservation"); | 16 | var folder = TestData.Get(@"TestData\UsingUrlReservation"); |
17 | var build = new Builder(folder, typeof(HttpExtensionFactory), new[] { folder }); | 17 | var build = new Builder(folder, typeof(HttpExtensionFactory), new[] { folder }); |
@@ -21,7 +21,7 @@ namespace WixToolsetTest.Http | |||
21 | { | 21 | { |
22 | "WixHttpUrlAce:ace3u9zYtPm8dLIoYgB0bARb0dbB9w\turlt8sDcF469vDrZNldk0moxI25IGM\tNT SERVICE\\TestService\t268435456", | 22 | "WixHttpUrlAce:ace3u9zYtPm8dLIoYgB0bARb0dbB9w\turlt8sDcF469vDrZNldk0moxI25IGM\tNT SERVICE\\TestService\t268435456", |
23 | "WixHttpUrlReservation:urlt8sDcF469vDrZNldk0moxI25IGM\t0\t\thttp://+:80/vroot/\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", | 23 | "WixHttpUrlReservation:urlt8sDcF469vDrZNldk0moxI25IGM\t0\t\thttp://+:80/vroot/\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo", |
24 | }, results.OrderBy(s => s).ToArray()); | 24 | }, results); |
25 | } | 25 | } |
26 | 26 | ||
27 | private static void Build(string[] args) | 27 | private static void Build(string[] args) |
diff --git a/src/wixext/HttpCompiler.cs b/src/wixext/HttpCompiler.cs index 094f5594..e47990db 100644 --- a/src/wixext/HttpCompiler.cs +++ b/src/wixext/HttpCompiler.cs | |||
@@ -28,9 +28,9 @@ namespace WixToolset.Http | |||
28 | switch (parentElement.Name.LocalName) | 28 | switch (parentElement.Name.LocalName) |
29 | { | 29 | { |
30 | case "ServiceInstall": | 30 | case "ServiceInstall": |
31 | string serviceInstallName = context["ServiceInstallName"]; | 31 | var serviceInstallName = context["ServiceInstallName"]; |
32 | string serviceUser = String.IsNullOrEmpty(serviceInstallName) ? null : String.Concat("NT SERVICE\\", serviceInstallName); | 32 | var serviceUser = String.IsNullOrEmpty(serviceInstallName) ? null : String.Concat("NT SERVICE\\", serviceInstallName); |
33 | string serviceComponentId = context["ServiceInstallComponentId"]; | 33 | var serviceComponentId = context["ServiceInstallComponentId"]; |
34 | 34 | ||
35 | switch (element.Name.LocalName) | 35 | switch (element.Name.LocalName) |
36 | { | 36 | { |
@@ -69,15 +69,14 @@ namespace WixToolset.Http | |||
69 | /// <param name="securityPrincipal">The security principal of the parent element (null if nested under Component).</param> | 69 | /// <param name="securityPrincipal">The security principal of the parent element (null if nested under Component).</param> |
70 | private void ParseUrlReservationElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, string securityPrincipal) | 70 | private void ParseUrlReservationElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, string securityPrincipal) |
71 | { | 71 | { |
72 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 72 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
73 | Identifier id = null; | 73 | Identifier id = null; |
74 | int handleExisting = HttpConstants.heReplace; | 74 | var handleExisting = HttpConstants.heReplace; |
75 | string handleExistingValue = null; | ||
76 | string sddl = null; | 75 | string sddl = null; |
77 | string url = null; | 76 | string url = null; |
78 | bool foundACE = false; | 77 | var foundACE = false; |
79 | 78 | ||
80 | foreach (XAttribute attrib in node.Attributes()) | 79 | foreach (var attrib in node.Attributes()) |
81 | { | 80 | { |
82 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 81 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
83 | { | 82 | { |
@@ -87,7 +86,7 @@ namespace WixToolset.Http | |||
87 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | 86 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
88 | break; | 87 | break; |
89 | case "HandleExisting": | 88 | case "HandleExisting": |
90 | handleExistingValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 89 | var handleExistingValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
91 | switch (handleExistingValue) | 90 | switch (handleExistingValue) |
92 | { | 91 | { |
93 | case "replace": | 92 | case "replace": |
@@ -128,7 +127,7 @@ namespace WixToolset.Http | |||
128 | } | 127 | } |
129 | 128 | ||
130 | // Parse UrlAce children. | 129 | // Parse UrlAce children. |
131 | foreach (XElement child in node.Elements()) | 130 | foreach (var child in node.Elements()) |
132 | { | 131 | { |
133 | if (this.Namespace == child.Name.Namespace) | 132 | if (this.Namespace == child.Name.Namespace) |
134 | { | 133 | { |
@@ -170,23 +169,25 @@ namespace WixToolset.Http | |||
170 | 169 | ||
171 | if (!this.Messaging.EncounteredError) | 170 | if (!this.Messaging.EncounteredError) |
172 | { | 171 | { |
173 | var row = (WixHttpUrlReservationTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixHttpUrlReservation", id); | 172 | section.AddTuple(new WixHttpUrlReservationTuple(sourceLineNumbers, id) |
174 | row.HandleExisting = handleExisting; | 173 | { |
175 | row.Sddl = sddl; | 174 | HandleExisting = handleExisting, |
176 | row.Url = url; | 175 | Sddl = sddl, |
177 | row.Component_ = componentId; | 176 | Url = url, |
177 | ComponentRef = componentId, | ||
178 | }); | ||
178 | 179 | ||
179 | if (this.Context.Platform == Platform.ARM) | 180 | if (this.Context.Platform == Platform.ARM) |
180 | { | 181 | { |
181 | // Ensure ARM version of the CA is referenced. | 182 | // Ensure ARM version of the CA is referenced. |
182 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsInstall_ARM"); | 183 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "WixSchedHttpUrlReservationsInstall_ARM"); |
183 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsUninstall_ARM"); | 184 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "WixSchedHttpUrlReservationsUninstall_ARM"); |
184 | } | 185 | } |
185 | else | 186 | else |
186 | { | 187 | { |
187 | // All other supported platforms use x86. | 188 | // All other supported platforms use x86. |
188 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsInstall"); | 189 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "WixSchedHttpUrlReservationsInstall"); |
189 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "WixSchedHttpUrlReservationsUninstall"); | 190 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "WixSchedHttpUrlReservationsUninstall"); |
190 | } | 191 | } |
191 | } | 192 | } |
192 | } | 193 | } |
@@ -199,13 +200,13 @@ namespace WixToolset.Http | |||
199 | /// <param name="defaultSecurityPrincipal">The default security principal.</param> | 200 | /// <param name="defaultSecurityPrincipal">The default security principal.</param> |
200 | private void ParseUrlAceElement(Intermediate intermediate, IntermediateSection section, XElement node, string urlReservationId, string defaultSecurityPrincipal) | 201 | private void ParseUrlAceElement(Intermediate intermediate, IntermediateSection section, XElement node, string urlReservationId, string defaultSecurityPrincipal) |
201 | { | 202 | { |
202 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 203 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
203 | Identifier id = null; | 204 | Identifier id = null; |
204 | string securityPrincipal = defaultSecurityPrincipal; | 205 | var securityPrincipal = defaultSecurityPrincipal; |
205 | int rights = HttpConstants.GENERIC_ALL; | 206 | var rights = HttpConstants.GENERIC_ALL; |
206 | string rightsValue = null; | 207 | string rightsValue = null; |
207 | 208 | ||
208 | foreach (XAttribute attrib in node.Attributes()) | 209 | foreach (var attrib in node.Attributes()) |
209 | { | 210 | { |
210 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 211 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
211 | { | 212 | { |
@@ -262,10 +263,12 @@ namespace WixToolset.Http | |||
262 | 263 | ||
263 | if (!this.Messaging.EncounteredError) | 264 | if (!this.Messaging.EncounteredError) |
264 | { | 265 | { |
265 | var row = (WixHttpUrlAceTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixHttpUrlAce", id); | 266 | section.AddTuple(new WixHttpUrlAceTuple(sourceLineNumbers, id) |
266 | row.WixHttpUrlReservation_ = urlReservationId; | 267 | { |
267 | row.SecurityPrincipal = securityPrincipal; | 268 | WixHttpUrlReservationRef = urlReservationId, |
268 | row.Rights = rights; | 269 | SecurityPrincipal = securityPrincipal, |
270 | Rights = rights, | ||
271 | }); | ||
269 | } | 272 | } |
270 | } | 273 | } |
271 | } | 274 | } |
diff --git a/src/wixext/HttpTableDefinitions.cs b/src/wixext/HttpTableDefinitions.cs new file mode 100644 index 00000000..57422475 --- /dev/null +++ b/src/wixext/HttpTableDefinitions.cs | |||
@@ -0,0 +1,42 @@ | |||
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 WixToolset.Data.WindowsInstaller; | ||
6 | |||
7 | public static class HttpTableDefinitions | ||
8 | { | ||
9 | public static readonly TableDefinition WixHttpUrlReservation = new TableDefinition( | ||
10 | "WixHttpUrlReservation", | ||
11 | new[] | ||
12 | { | ||
13 | new ColumnDefinition("WixHttpUrlReservation", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The non-localized primary key for the table.", modularizeType: ColumnModularizeType.Column), | ||
14 | new ColumnDefinition("HandleExisting", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 2, description: "The behavior when trying to install a URL reservation and it already exists."), | ||
15 | new ColumnDefinition("Sddl", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Formatted, description: "Security descriptor for the URL reservation.", modularizeType: ColumnModularizeType.Property), | ||
16 | new ColumnDefinition("Url", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "URL to be reserved.", modularizeType: ColumnModularizeType.Property), | ||
17 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key into the Component table referencing the component that controls the URL reservation.", modularizeType: ColumnModularizeType.Column), | ||
18 | }, | ||
19 | tupleDefinitionName: HttpTupleDefinitions.WixHttpUrlReservation.Name, | ||
20 | tupleIdIsPrimaryKey: true | ||
21 | ); | ||
22 | |||
23 | public static readonly TableDefinition WixHttpUrlAce = new TableDefinition( | ||
24 | "WixHttpUrlAce", | ||
25 | new[] | ||
26 | { | ||
27 | new ColumnDefinition("WixHttpUrlAce", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "The non-localized primary key for the table.", modularizeType: ColumnModularizeType.Column), | ||
28 | new ColumnDefinition("WixHttpUrlReservation_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "WixHttpUrlReservation", keyColumn: 1, description: "Foreign key into the WixHttpUrlReservation table.", modularizeType: ColumnModularizeType.Column), | ||
29 | new ColumnDefinition("SecurityPrincipal", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "The security principal for this ACE.", modularizeType: ColumnModularizeType.Property), | ||
30 | new ColumnDefinition("Rights", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown, minValue: 0, maxValue: 1073741824, description: "The rights for this ACE."), | ||
31 | }, | ||
32 | tupleDefinitionName: HttpTupleDefinitions.WixHttpUrlAce.Name, | ||
33 | tupleIdIsPrimaryKey: true | ||
34 | ); | ||
35 | |||
36 | public static readonly TableDefinition[] All = new[] | ||
37 | { | ||
38 | WixHttpUrlReservation, | ||
39 | WixHttpUrlAce, | ||
40 | }; | ||
41 | } | ||
42 | } | ||
diff --git a/src/wixext/HttpWindowsInstallerBackendBinderExtension.cs b/src/wixext/HttpWindowsInstallerBackendBinderExtension.cs index f8dd1838..7a94257b 100644 --- a/src/wixext/HttpWindowsInstallerBackendBinderExtension.cs +++ b/src/wixext/HttpWindowsInstallerBackendBinderExtension.cs | |||
@@ -1,27 +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.Http | 3 | namespace WixToolset.Http |
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 HttpWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension | 9 | public class HttpWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension |
12 | { | 10 | { |
13 | private static readonly TableDefinition[] Tables = LoadTables(); | 11 | public override IEnumerable<TableDefinition> TableDefinitions => HttpTableDefinitions.All; |
14 | |||
15 | public override IEnumerable<TableDefinition> TableDefinitions => Tables; | ||
16 | |||
17 | private static TableDefinition[] LoadTables() | ||
18 | { | ||
19 | using (var resourceStream = typeof(HttpWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Http.tables.xml")) | ||
20 | using (var reader = XmlReader.Create(resourceStream)) | ||
21 | { | ||
22 | var tables = TableDefinitionCollection.Load(reader); | ||
23 | return tables.ToArray(); | ||
24 | } | ||
25 | } | ||
26 | } | 12 | } |
27 | } | 13 | } |
diff --git a/src/wixext/Tuples/WixHttpUrlAceTuple.cs b/src/wixext/Tuples/WixHttpUrlAceTuple.cs index 3e0006a0..f605c217 100644 --- a/src/wixext/Tuples/WixHttpUrlAceTuple.cs +++ b/src/wixext/Tuples/WixHttpUrlAceTuple.cs | |||
@@ -11,8 +11,7 @@ namespace WixToolset.Http | |||
11 | HttpTupleDefinitionType.WixHttpUrlAce.ToString(), | 11 | HttpTupleDefinitionType.WixHttpUrlAce.ToString(), |
12 | new[] | 12 | new[] |
13 | { | 13 | { |
14 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.WixHttpUrlAce), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.WixHttpUrlReservationRef), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.WixHttpUrlReservation_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.SecurityPrincipal), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.SecurityPrincipal), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.Rights), IntermediateFieldType.Number), | 16 | new IntermediateFieldDefinition(nameof(WixHttpUrlAceTupleFields.Rights), IntermediateFieldType.Number), |
18 | }, | 17 | }, |
@@ -26,8 +25,7 @@ namespace WixToolset.Http.Tuples | |||
26 | 25 | ||
27 | public enum WixHttpUrlAceTupleFields | 26 | public enum WixHttpUrlAceTupleFields |
28 | { | 27 | { |
29 | WixHttpUrlAce, | 28 | WixHttpUrlReservationRef, |
30 | WixHttpUrlReservation_, | ||
31 | SecurityPrincipal, | 29 | SecurityPrincipal, |
32 | Rights, | 30 | Rights, |
33 | } | 31 | } |
@@ -44,16 +42,10 @@ namespace WixToolset.Http.Tuples | |||
44 | 42 | ||
45 | public IntermediateField this[WixHttpUrlAceTupleFields index] => this.Fields[(int)index]; | 43 | public IntermediateField this[WixHttpUrlAceTupleFields index] => this.Fields[(int)index]; |
46 | 44 | ||
47 | public string WixHttpUrlAce | 45 | public string WixHttpUrlReservationRef |
48 | { | 46 | { |
49 | get => this.Fields[(int)WixHttpUrlAceTupleFields.WixHttpUrlAce].AsString(); | 47 | get => this.Fields[(int)WixHttpUrlAceTupleFields.WixHttpUrlReservationRef].AsString(); |
50 | set => this.Set((int)WixHttpUrlAceTupleFields.WixHttpUrlAce, value); | 48 | set => this.Set((int)WixHttpUrlAceTupleFields.WixHttpUrlReservationRef, value); |
51 | } | ||
52 | |||
53 | public string WixHttpUrlReservation_ | ||
54 | { | ||
55 | get => this.Fields[(int)WixHttpUrlAceTupleFields.WixHttpUrlReservation_].AsString(); | ||
56 | set => this.Set((int)WixHttpUrlAceTupleFields.WixHttpUrlReservation_, value); | ||
57 | } | 49 | } |
58 | 50 | ||
59 | public string SecurityPrincipal | 51 | public string SecurityPrincipal |
diff --git a/src/wixext/Tuples/WixHttpUrlReservationTuple.cs b/src/wixext/Tuples/WixHttpUrlReservationTuple.cs index 7a251f3d..d7dbb0a5 100644 --- a/src/wixext/Tuples/WixHttpUrlReservationTuple.cs +++ b/src/wixext/Tuples/WixHttpUrlReservationTuple.cs | |||
@@ -11,11 +11,10 @@ namespace WixToolset.Http | |||
11 | HttpTupleDefinitionType.WixHttpUrlReservation.ToString(), | 11 | HttpTupleDefinitionType.WixHttpUrlReservation.ToString(), |
12 | new[] | 12 | new[] |
13 | { | 13 | { |
14 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.WixHttpUrlReservation), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.HandleExisting), IntermediateFieldType.Number), | 14 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.HandleExisting), IntermediateFieldType.Number), |
16 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Sddl), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Sddl), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Url), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Url), IntermediateFieldType.String), |
18 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.Component_), IntermediateFieldType.String), | 17 | new IntermediateFieldDefinition(nameof(WixHttpUrlReservationTupleFields.ComponentRef), IntermediateFieldType.String), |
19 | }, | 18 | }, |
20 | typeof(WixHttpUrlReservationTuple)); | 19 | typeof(WixHttpUrlReservationTuple)); |
21 | } | 20 | } |
@@ -27,11 +26,10 @@ namespace WixToolset.Http.Tuples | |||
27 | 26 | ||
28 | public enum WixHttpUrlReservationTupleFields | 27 | public enum WixHttpUrlReservationTupleFields |
29 | { | 28 | { |
30 | WixHttpUrlReservation, | ||
31 | HandleExisting, | 29 | HandleExisting, |
32 | Sddl, | 30 | Sddl, |
33 | Url, | 31 | Url, |
34 | Component_, | 32 | ComponentRef, |
35 | } | 33 | } |
36 | 34 | ||
37 | public class WixHttpUrlReservationTuple : IntermediateTuple | 35 | public class WixHttpUrlReservationTuple : IntermediateTuple |
@@ -46,12 +44,6 @@ namespace WixToolset.Http.Tuples | |||
46 | 44 | ||
47 | public IntermediateField this[WixHttpUrlReservationTupleFields index] => this.Fields[(int)index]; | 45 | public IntermediateField this[WixHttpUrlReservationTupleFields index] => this.Fields[(int)index]; |
48 | 46 | ||
49 | public string WixHttpUrlReservation | ||
50 | { | ||
51 | get => this.Fields[(int)WixHttpUrlReservationTupleFields.WixHttpUrlReservation].AsString(); | ||
52 | set => this.Set((int)WixHttpUrlReservationTupleFields.WixHttpUrlReservation, value); | ||
53 | } | ||
54 | |||
55 | public int HandleExisting | 47 | public int HandleExisting |
56 | { | 48 | { |
57 | get => this.Fields[(int)WixHttpUrlReservationTupleFields.HandleExisting].AsNumber(); | 49 | get => this.Fields[(int)WixHttpUrlReservationTupleFields.HandleExisting].AsNumber(); |
@@ -70,10 +62,10 @@ namespace WixToolset.Http.Tuples | |||
70 | set => this.Set((int)WixHttpUrlReservationTupleFields.Url, value); | 62 | set => this.Set((int)WixHttpUrlReservationTupleFields.Url, value); |
71 | } | 63 | } |
72 | 64 | ||
73 | public string Component_ | 65 | public string ComponentRef |
74 | { | 66 | { |
75 | get => this.Fields[(int)WixHttpUrlReservationTupleFields.Component_].AsString(); | 67 | get => this.Fields[(int)WixHttpUrlReservationTupleFields.ComponentRef].AsString(); |
76 | set => this.Set((int)WixHttpUrlReservationTupleFields.Component_, value); | 68 | set => this.Set((int)WixHttpUrlReservationTupleFields.ComponentRef, value); |
77 | } | 69 | } |
78 | } | 70 | } |
79 | } \ No newline at end of file | 71 | } \ No newline at end of file |
diff --git a/src/wixext/WixToolset.Http.wixext.csproj b/src/wixext/WixToolset.Http.wixext.csproj index c681e308..59c278e6 100644 --- a/src/wixext/WixToolset.Http.wixext.csproj +++ b/src/wixext/WixToolset.Http.wixext.csproj | |||
@@ -14,7 +14,6 @@ | |||
14 | <ItemGroup> | 14 | <ItemGroup> |
15 | <Content Include="$(MSBuildThisFileName).targets" /> | 15 | <Content Include="$(MSBuildThisFileName).targets" /> |
16 | <Content Include="http.xsd" PackagePath="tools" /> | 16 | <Content Include="http.xsd" PackagePath="tools" /> |
17 | <EmbeddedResource Include="tables.xml" /> | ||
18 | <EmbeddedResource Include="$(OutputPath)..\http.wixlib" /> | 17 | <EmbeddedResource Include="$(OutputPath)..\http.wixlib" /> |
19 | </ItemGroup> | 18 | </ItemGroup> |
20 | 19 | ||
diff --git a/src/wixext/tables.xml b/src/wixext/tables.xml deleted file mode 100644 index 576fc2a7..00000000 --- a/src/wixext/tables.xml +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- 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. --> | ||
3 | |||
4 | |||
5 | <tableDefinitions xmlns="http://wixtoolset.org/schemas/v4/wi/tables"> | ||
6 | <tableDefinition name="WixHttpUrlReservation"> | ||
7 | <columnDefinition name="WixHttpUrlReservation" type="string" length="72" primaryKey="yes" modularize="column" | ||
8 | category="identifier" description="The non-localized primary key for the table." /> | ||
9 | <columnDefinition name="HandleExisting" type="number" length="4" nullable="no" | ||
10 | minValue="0" maxValue="2" description="The behavior when trying to install a URL reservation and it already exists." /> | ||
11 | <columnDefinition name="Sddl" type="string" length="0" modularize="property" nullable="yes" | ||
12 | category="formatted" description="Security descriptor for the URL reservation." /> | ||
13 | <columnDefinition name="Url" type="string" length="0" modularize="property" nullable="no" | ||
14 | category="formatted" description="URL to be reserved." /> | ||
15 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
16 | keyTable="Component" keyColumn="1" category="identifier" description="Foreign key into the Component table referencing the component that controls the URL reservation." /> | ||
17 | </tableDefinition> | ||
18 | <tableDefinition name="WixHttpUrlAce"> | ||
19 | <columnDefinition name="WixHttpUrlAce" type="string" length="72" primaryKey="yes" modularize="column" | ||
20 | category="identifier" description="The non-localized primary key for the table." /> | ||
21 | <columnDefinition name="WixHttpUrlReservation_" type="string" length="72" keyTable="WixHttpUrlReservation" keyColumn="1" modularize="column" | ||
22 | category="identifier" description="Foreign key into the WixHttpUrlReservation table." /> | ||
23 | <columnDefinition name="SecurityPrincipal" type="string" length="0" modularize="property" | ||
24 | category="formatted" description="The security principal for this ACE." /> | ||
25 | <columnDefinition name="Rights" type="number" length="4" nullable="no" | ||
26 | minValue="0" maxValue="1073741824" description="The rights for this ACE." /> | ||
27 | </tableDefinition> | ||
28 | </tableDefinitions> | ||