diff options
-rw-r--r-- | src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs | 4 | ||||
-rw-r--r-- | src/wixext/MsmqCompiler.cs | 98 | ||||
-rw-r--r-- | src/wixext/MsmqTableDefinitions.cs | 64 | ||||
-rw-r--r-- | src/wixext/MsmqWindowsInstallerBackendExtension.cs | 23 | ||||
-rw-r--r-- | src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs | 38 | ||||
-rw-r--r-- | src/wixext/Tuples/MessageQueueTuple.cs | 18 | ||||
-rw-r--r-- | src/wixext/Tuples/MessageQueueUserPermissionTuple.cs | 38 | ||||
-rw-r--r-- | src/wixext/WixToolset.Msmq.wixext.csproj | 1 | ||||
-rw-r--r-- | src/wixext/tables.xml | 54 |
9 files changed, 155 insertions, 183 deletions
diff --git a/src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs b/src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs index af64517d..057b0a9d 100644 --- a/src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs +++ b/src/test/WixToolsetTest.Msmq/MsmqExtensionFixture.cs | |||
@@ -19,8 +19,8 @@ namespace WixToolsetTest.Msmq | |||
19 | var results = build.BuildAndQuery(Build, "MessageQueue"); | 19 | var results = build.BuildAndQuery(Build, "MessageQueue"); |
20 | Assert.Equal(new[] | 20 | Assert.Equal(new[] |
21 | { | 21 | { |
22 | "MessageQueue:TestMQ\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t0\t0\tMQLabel\t\tMQPath\t0\t0\t\t0", | 22 | "MessageQueue:TestMQ\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\t\t\tMQLabel\t\tMQPath\t\t\t\t0", |
23 | }, results.OrderBy(s => s).ToArray()); | 23 | }, results); |
24 | } | 24 | } |
25 | 25 | ||
26 | private static void Build(string[] args) | 26 | private static void Build(string[] args) |
diff --git a/src/wixext/MsmqCompiler.cs b/src/wixext/MsmqCompiler.cs index 5365f0fb..15c3f3ca 100644 --- a/src/wixext/MsmqCompiler.cs +++ b/src/wixext/MsmqCompiler.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Msmq | |||
7 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | using WixToolset.Extensibility; | 9 | using WixToolset.Extensibility; |
10 | using WixToolset.Msmq.Tuples; | ||
10 | 11 | ||
11 | /// <summary> | 12 | /// <summary> |
12 | /// The compiler for the WiX Toolset MSMQ Extension. | 13 | /// The compiler for the WiX Toolset MSMQ Extension. |
@@ -69,8 +70,8 @@ namespace WixToolset.Msmq | |||
69 | switch (parentElement.Name.LocalName) | 70 | switch (parentElement.Name.LocalName) |
70 | { | 71 | { |
71 | case "Component": | 72 | case "Component": |
72 | string componentId = context["ComponentId"]; | 73 | var componentId = context["ComponentId"]; |
73 | string directoryId = context["DirectoryId"]; | 74 | var directoryId = context["DirectoryId"]; |
74 | 75 | ||
75 | switch (element.Name.LocalName) | 76 | switch (element.Name.LocalName) |
76 | { | 77 | { |
@@ -98,20 +99,20 @@ namespace WixToolset.Msmq | |||
98 | /// <param name="componentKey">Identifier of parent component.</param> | 99 | /// <param name="componentKey">Identifier of parent component.</param> |
99 | private void ParseMessageQueueElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId) | 100 | private void ParseMessageQueueElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId) |
100 | { | 101 | { |
101 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 102 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
102 | 103 | ||
103 | Identifier id = null; | 104 | Identifier id = null; |
104 | int basePriority = CompilerConstants.IntegerNotSet; | 105 | var basePriority = CompilerConstants.IntegerNotSet; |
105 | int journalQuota = CompilerConstants.IntegerNotSet; | 106 | var journalQuota = CompilerConstants.IntegerNotSet; |
106 | string label = null; | 107 | string label = null; |
107 | string multicastAddress = null; | 108 | string multicastAddress = null; |
108 | string pathName = null; | 109 | string pathName = null; |
109 | int privLevel = CompilerConstants.IntegerNotSet; | 110 | var privLevel = CompilerConstants.IntegerNotSet; |
110 | int quota = CompilerConstants.IntegerNotSet; | 111 | var quota = CompilerConstants.IntegerNotSet; |
111 | string serviceTypeGuid = null; | 112 | string serviceTypeGuid = null; |
112 | int attributes = 0; | 113 | int attributes = 0; |
113 | 114 | ||
114 | foreach (XAttribute attrib in node.Attributes()) | 115 | foreach (var attrib in node.Attributes()) |
115 | { | 116 | { |
116 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 117 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
117 | { | 118 | { |
@@ -156,7 +157,7 @@ namespace WixToolset.Msmq | |||
156 | pathName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 157 | pathName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
157 | break; | 158 | break; |
158 | case "PrivLevel": | 159 | case "PrivLevel": |
159 | string privLevelAttr = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 160 | var privLevelAttr = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
160 | switch (privLevelAttr) | 161 | switch (privLevelAttr) |
161 | { | 162 | { |
162 | case "none": | 163 | case "none": |
@@ -200,7 +201,7 @@ namespace WixToolset.Msmq | |||
200 | } | 201 | } |
201 | } | 202 | } |
202 | 203 | ||
203 | foreach (XElement child in node.Elements()) | 204 | foreach (var child in node.Elements()) |
204 | { | 205 | { |
205 | if (this.Namespace == child.Name.Namespace) | 206 | if (this.Namespace == child.Name.Namespace) |
206 | { | 207 | { |
@@ -220,32 +221,36 @@ namespace WixToolset.Msmq | |||
220 | } | 221 | } |
221 | } | 222 | } |
222 | 223 | ||
223 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueue", id); | 224 | var tuple = section.AddTuple(new MessageQueueTuple(sourceLineNumbers, id) |
224 | row.Set(1, componentId); | 225 | { |
226 | ComponentRef = componentId, | ||
227 | Label = label, | ||
228 | MulticastAddress = multicastAddress, | ||
229 | PathName = pathName, | ||
230 | ServiceTypeGuid = serviceTypeGuid, | ||
231 | Attributes = attributes, | ||
232 | }); | ||
233 | |||
225 | if (CompilerConstants.IntegerNotSet != basePriority) | 234 | if (CompilerConstants.IntegerNotSet != basePriority) |
226 | { | 235 | { |
227 | row.Set(2, basePriority); | 236 | tuple.BasePriority = basePriority; |
228 | } | 237 | } |
229 | if (CompilerConstants.IntegerNotSet != journalQuota) | 238 | if (CompilerConstants.IntegerNotSet != journalQuota) |
230 | { | 239 | { |
231 | row.Set(3, journalQuota); | 240 | tuple.JournalQuota = journalQuota; |
232 | } | 241 | } |
233 | row.Set(4, label); | 242 | |
234 | row.Set(5, multicastAddress); | ||
235 | row.Set(6, pathName); | ||
236 | if (CompilerConstants.IntegerNotSet != privLevel) | 243 | if (CompilerConstants.IntegerNotSet != privLevel) |
237 | { | 244 | { |
238 | row.Set(7, privLevel); | 245 | tuple.PrivLevel = privLevel; |
239 | } | 246 | } |
240 | if (CompilerConstants.IntegerNotSet != quota) | 247 | if (CompilerConstants.IntegerNotSet != quota) |
241 | { | 248 | { |
242 | row.Set(8, quota); | 249 | tuple.Quota = quota; |
243 | } | 250 | } |
244 | row.Set(9, serviceTypeGuid); | ||
245 | row.Set(10, attributes); | ||
246 | 251 | ||
247 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MessageQueuingInstall"); | 252 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MessageQueuingInstall"); |
248 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MessageQueuingUninstall"); | 253 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "MessageQueuingUninstall"); |
249 | } | 254 | } |
250 | 255 | ||
251 | /// <summary> | 256 | /// <summary> |
@@ -256,14 +261,14 @@ namespace WixToolset.Msmq | |||
256 | /// <param name="applicationKey">Optional identifier of parent message queue.</param> | 261 | /// <param name="applicationKey">Optional identifier of parent message queue.</param> |
257 | private void ParseMessageQueuePermissionElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, string messageQueueId) | 262 | private void ParseMessageQueuePermissionElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, string messageQueueId) |
258 | { | 263 | { |
259 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); | 264 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); |
260 | 265 | ||
261 | Identifier id = null; | 266 | Identifier id = null; |
262 | string user = null; | 267 | string user = null; |
263 | string group = null; | 268 | string group = null; |
264 | int permissions = 0; | 269 | int permissions = 0; |
265 | 270 | ||
266 | foreach (XAttribute attrib in node.Attributes()) | 271 | foreach (var attrib in node.Attributes()) |
267 | { | 272 | { |
268 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 273 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
269 | { | 274 | { |
@@ -278,7 +283,7 @@ namespace WixToolset.Msmq | |||
278 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | 283 | this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); |
279 | } | 284 | } |
280 | messageQueueId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); | 285 | messageQueueId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib); |
281 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "MessageQueue", messageQueueId); | 286 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, MsmqTupleDefinitions.MessageQueue, messageQueueId); |
282 | break; | 287 | break; |
283 | case "User": | 288 | case "User": |
284 | if (null != group) | 289 | if (null != group) |
@@ -467,6 +472,11 @@ namespace WixToolset.Msmq | |||
467 | } | 472 | } |
468 | } | 473 | } |
469 | 474 | ||
475 | if (null == id) | ||
476 | { | ||
477 | id = this.ParseHelper.CreateIdentifier("mqp", componentId, messageQueueId, user, group); | ||
478 | } | ||
479 | |||
470 | if (null == messageQueueId) | 480 | if (null == messageQueueId) |
471 | { | 481 | { |
472 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MessageQueue")); | 482 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "MessageQueue")); |
@@ -480,19 +490,23 @@ namespace WixToolset.Msmq | |||
480 | 490 | ||
481 | if (null != user) | 491 | if (null != user) |
482 | { | 492 | { |
483 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueueUserPermission", id); | 493 | section.AddTuple(new MessageQueueUserPermissionTuple(sourceLineNumbers, id) |
484 | row.Set(1, componentId); | 494 | { |
485 | row.Set(2, messageQueueId); | 495 | ComponentRef = componentId, |
486 | row.Set(3, user); | 496 | MessageQueueRef = messageQueueId, |
487 | row.Set(4, permissions); | 497 | UserRef = user, |
498 | Permissions = permissions, | ||
499 | }); | ||
488 | } | 500 | } |
489 | if (null != group) | 501 | if (null != group) |
490 | { | 502 | { |
491 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "MessageQueueGroupPermission", id); | 503 | section.AddTuple(new MessageQueueGroupPermissionTuple(sourceLineNumbers, id) |
492 | row.Set(1, componentId); | 504 | { |
493 | row.Set(2, messageQueueId); | 505 | ComponentRef = componentId, |
494 | row.Set(3, group); | 506 | MessageQueueRef = messageQueueId, |
495 | row.Set(4, permissions); | 507 | GroupRef = group, |
508 | Permissions = permissions, | ||
509 | }); | ||
496 | } | 510 | } |
497 | } | 511 | } |
498 | 512 | ||
@@ -504,19 +518,11 @@ namespace WixToolset.Msmq | |||
504 | /// <returns></returns> | 518 | /// <returns></returns> |
505 | string TryFormatGuidValue(string val) | 519 | string TryFormatGuidValue(string val) |
506 | { | 520 | { |
507 | try | 521 | if (!Guid.TryParse(val, out var guid)) |
508 | { | ||
509 | Guid guid = new Guid(val); | ||
510 | return guid.ToString("B").ToUpper(); | ||
511 | } | ||
512 | catch (FormatException) | ||
513 | { | ||
514 | return val; | ||
515 | } | ||
516 | catch (OverflowException) | ||
517 | { | 522 | { |
518 | return val; | 523 | return val; |
519 | } | 524 | } |
525 | return guid.ToString("B").ToUpper(); | ||
520 | } | 526 | } |
521 | } | 527 | } |
522 | } | 528 | } |
diff --git a/src/wixext/MsmqTableDefinitions.cs b/src/wixext/MsmqTableDefinitions.cs new file mode 100644 index 00000000..00149ffa --- /dev/null +++ b/src/wixext/MsmqTableDefinitions.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 | |||
3 | namespace WixToolset.Msmq | ||
4 | { | ||
5 | using WixToolset.Data.WindowsInstaller; | ||
6 | |||
7 | public static class MsmqTableDefinitions | ||
8 | { | ||
9 | public static readonly TableDefinition MessageQueue = new TableDefinition( | ||
10 | "MessageQueue", | ||
11 | new[] | ||
12 | { | ||
13 | new ColumnDefinition("MessageQueue", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
14 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
15 | new ColumnDefinition("BasePriority", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown), | ||
16 | new ColumnDefinition("JournalQuota", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown), | ||
17 | new ColumnDefinition("Label", ColumnType.Localized, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
18 | new ColumnDefinition("MulticastAddress", ColumnType.String, 255, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
19 | new ColumnDefinition("PathName", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
20 | new ColumnDefinition("PrivLevel", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown), | ||
21 | new ColumnDefinition("Quota", ColumnType.Number, 4, primaryKey: false, nullable: true, ColumnCategory.Unknown), | ||
22 | new ColumnDefinition("ServiceTypeGuid", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Formatted, modularizeType: ColumnModularizeType.Property), | ||
23 | new ColumnDefinition("Attributes", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
24 | }, | ||
25 | tupleDefinitionName: MsmqTupleDefinitions.MessageQueue.Name, | ||
26 | tupleIdIsPrimaryKey: true | ||
27 | ); | ||
28 | |||
29 | public static readonly TableDefinition MessageQueueUserPermission = new TableDefinition( | ||
30 | "MessageQueueUserPermission", | ||
31 | new[] | ||
32 | { | ||
33 | new ColumnDefinition("MessageQueueUserPermission", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
34 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
35 | new ColumnDefinition("MessageQueue_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "MessageQueue", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
36 | new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
37 | new ColumnDefinition("Permissions", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
38 | }, | ||
39 | tupleDefinitionName: MsmqTupleDefinitions.MessageQueueUserPermission.Name, | ||
40 | tupleIdIsPrimaryKey: true | ||
41 | ); | ||
42 | |||
43 | public static readonly TableDefinition MessageQueueGroupPermission = new TableDefinition( | ||
44 | "MessageQueueGroupPermission", | ||
45 | new[] | ||
46 | { | ||
47 | new ColumnDefinition("MessageQueueGroupPermission", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
48 | new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
49 | new ColumnDefinition("MessageQueue_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "MessageQueue", keyColumn: 1, modularizeType: ColumnModularizeType.Column), | ||
50 | new ColumnDefinition("Group_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, modularizeType: ColumnModularizeType.Column), | ||
51 | new ColumnDefinition("Permissions", ColumnType.Number, 4, primaryKey: false, nullable: false, ColumnCategory.Unknown), | ||
52 | }, | ||
53 | tupleDefinitionName: MsmqTupleDefinitions.MessageQueueGroupPermission.Name, | ||
54 | tupleIdIsPrimaryKey: true | ||
55 | ); | ||
56 | |||
57 | public static readonly TableDefinition[] All = new[] | ||
58 | { | ||
59 | MessageQueue, | ||
60 | MessageQueueUserPermission, | ||
61 | MessageQueueGroupPermission, | ||
62 | }; | ||
63 | } | ||
64 | } | ||
diff --git a/src/wixext/MsmqWindowsInstallerBackendExtension.cs b/src/wixext/MsmqWindowsInstallerBackendExtension.cs index 4debafeb..3f83db56 100644 --- a/src/wixext/MsmqWindowsInstallerBackendExtension.cs +++ b/src/wixext/MsmqWindowsInstallerBackendExtension.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.Msmq | 3 | namespace WixToolset.Msmq |
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 MsmqWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension | 9 | public class MsmqWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension |
12 | { | 10 | { |
13 | public MsmqWindowsInstallerBackendBinderExtension() | 11 | public override IEnumerable<TableDefinition> TableDefinitions => MsmqTableDefinitions.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(MsmqWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Msmq.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 | } |
diff --git a/src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs b/src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs index cc690f9a..0b1794fd 100644 --- a/src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs +++ b/src/wixext/Tuples/MessageQueueGroupPermissionTuple.cs | |||
@@ -11,10 +11,9 @@ namespace WixToolset.Msmq | |||
11 | MsmqTupleDefinitionType.MessageQueueGroupPermission.ToString(), | 11 | MsmqTupleDefinitionType.MessageQueueGroupPermission.ToString(), |
12 | new[] | 12 | new[] |
13 | { | 13 | { |
14 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.MessageQueueGroupPermission), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.ComponentRef), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.Component_), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.MessageQueueRef), IntermediateFieldType.String), |
16 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.MessageQueue_), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.GroupRef), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.Group_), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.Permissions), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(MessageQueueGroupPermissionTupleFields.Permissions), IntermediateFieldType.Number), |
19 | }, | 18 | }, |
20 | typeof(MessageQueueGroupPermissionTuple)); | 19 | typeof(MessageQueueGroupPermissionTuple)); |
@@ -27,10 +26,9 @@ namespace WixToolset.Msmq.Tuples | |||
27 | 26 | ||
28 | public enum MessageQueueGroupPermissionTupleFields | 27 | public enum MessageQueueGroupPermissionTupleFields |
29 | { | 28 | { |
30 | MessageQueueGroupPermission, | 29 | ComponentRef, |
31 | Component_, | 30 | MessageQueueRef, |
32 | MessageQueue_, | 31 | GroupRef, |
33 | Group_, | ||
34 | Permissions, | 32 | Permissions, |
35 | } | 33 | } |
36 | 34 | ||
@@ -46,28 +44,22 @@ namespace WixToolset.Msmq.Tuples | |||
46 | 44 | ||
47 | public IntermediateField this[MessageQueueGroupPermissionTupleFields index] => this.Fields[(int)index]; | 45 | public IntermediateField this[MessageQueueGroupPermissionTupleFields index] => this.Fields[(int)index]; |
48 | 46 | ||
49 | public string MessageQueueGroupPermission | 47 | public string ComponentRef |
50 | { | 48 | { |
51 | get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.MessageQueueGroupPermission].AsString(); | 49 | get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.ComponentRef].AsString(); |
52 | set => this.Set((int)MessageQueueGroupPermissionTupleFields.MessageQueueGroupPermission, value); | 50 | set => this.Set((int)MessageQueueGroupPermissionTupleFields.ComponentRef, value); |
53 | } | 51 | } |
54 | 52 | ||
55 | public string Component_ | 53 | public string MessageQueueRef |
56 | { | 54 | { |
57 | get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.Component_].AsString(); | 55 | get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.MessageQueueRef].AsString(); |
58 | set => this.Set((int)MessageQueueGroupPermissionTupleFields.Component_, value); | 56 | set => this.Set((int)MessageQueueGroupPermissionTupleFields.MessageQueueRef, value); |
59 | } | 57 | } |
60 | 58 | ||
61 | public string MessageQueue_ | 59 | public string GroupRef |
62 | { | 60 | { |
63 | get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.MessageQueue_].AsString(); | 61 | get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.GroupRef].AsString(); |
64 | set => this.Set((int)MessageQueueGroupPermissionTupleFields.MessageQueue_, value); | 62 | set => this.Set((int)MessageQueueGroupPermissionTupleFields.GroupRef, value); |
65 | } | ||
66 | |||
67 | public string Group_ | ||
68 | { | ||
69 | get => this.Fields[(int)MessageQueueGroupPermissionTupleFields.Group_].AsString(); | ||
70 | set => this.Set((int)MessageQueueGroupPermissionTupleFields.Group_, value); | ||
71 | } | 63 | } |
72 | 64 | ||
73 | public int Permissions | 65 | public int Permissions |
diff --git a/src/wixext/Tuples/MessageQueueTuple.cs b/src/wixext/Tuples/MessageQueueTuple.cs index 86f7f2a4..afbd1b7a 100644 --- a/src/wixext/Tuples/MessageQueueTuple.cs +++ b/src/wixext/Tuples/MessageQueueTuple.cs | |||
@@ -11,8 +11,7 @@ namespace WixToolset.Msmq | |||
11 | MsmqTupleDefinitionType.MessageQueue.ToString(), | 11 | MsmqTupleDefinitionType.MessageQueue.ToString(), |
12 | new[] | 12 | new[] |
13 | { | 13 | { |
14 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.MessageQueue), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.ComponentRef), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.BasePriority), IntermediateFieldType.Number), | 15 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.BasePriority), IntermediateFieldType.Number), |
17 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.JournalQuota), IntermediateFieldType.Number), | 16 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.JournalQuota), IntermediateFieldType.Number), |
18 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.Label), IntermediateFieldType.String), | 17 | new IntermediateFieldDefinition(nameof(MessageQueueTupleFields.Label), IntermediateFieldType.String), |
@@ -33,8 +32,7 @@ namespace WixToolset.Msmq.Tuples | |||
33 | 32 | ||
34 | public enum MessageQueueTupleFields | 33 | public enum MessageQueueTupleFields |
35 | { | 34 | { |
36 | MessageQueue, | 35 | ComponentRef, |
37 | Component_, | ||
38 | BasePriority, | 36 | BasePriority, |
39 | JournalQuota, | 37 | JournalQuota, |
40 | Label, | 38 | Label, |
@@ -58,16 +56,10 @@ namespace WixToolset.Msmq.Tuples | |||
58 | 56 | ||
59 | public IntermediateField this[MessageQueueTupleFields index] => this.Fields[(int)index]; | 57 | public IntermediateField this[MessageQueueTupleFields index] => this.Fields[(int)index]; |
60 | 58 | ||
61 | public string MessageQueue | 59 | public string ComponentRef |
62 | { | 60 | { |
63 | get => this.Fields[(int)MessageQueueTupleFields.MessageQueue].AsString(); | 61 | get => this.Fields[(int)MessageQueueTupleFields.ComponentRef].AsString(); |
64 | set => this.Set((int)MessageQueueTupleFields.MessageQueue, value); | 62 | set => this.Set((int)MessageQueueTupleFields.ComponentRef, value); |
65 | } | ||
66 | |||
67 | public string Component_ | ||
68 | { | ||
69 | get => this.Fields[(int)MessageQueueTupleFields.Component_].AsString(); | ||
70 | set => this.Set((int)MessageQueueTupleFields.Component_, value); | ||
71 | } | 63 | } |
72 | 64 | ||
73 | public int BasePriority | 65 | public int BasePriority |
diff --git a/src/wixext/Tuples/MessageQueueUserPermissionTuple.cs b/src/wixext/Tuples/MessageQueueUserPermissionTuple.cs index 8c5e6ade..c6d5a45a 100644 --- a/src/wixext/Tuples/MessageQueueUserPermissionTuple.cs +++ b/src/wixext/Tuples/MessageQueueUserPermissionTuple.cs | |||
@@ -11,10 +11,9 @@ namespace WixToolset.Msmq | |||
11 | MsmqTupleDefinitionType.MessageQueueUserPermission.ToString(), | 11 | MsmqTupleDefinitionType.MessageQueueUserPermission.ToString(), |
12 | new[] | 12 | new[] |
13 | { | 13 | { |
14 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.MessageQueueUserPermission), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.ComponentRef), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.Component_), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.MessageQueueRef), IntermediateFieldType.String), |
16 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.MessageQueue_), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.UserRef), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.User_), IntermediateFieldType.String), | ||
18 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.Permissions), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(MessageQueueUserPermissionTupleFields.Permissions), IntermediateFieldType.Number), |
19 | }, | 18 | }, |
20 | typeof(MessageQueueUserPermissionTuple)); | 19 | typeof(MessageQueueUserPermissionTuple)); |
@@ -27,10 +26,9 @@ namespace WixToolset.Msmq.Tuples | |||
27 | 26 | ||
28 | public enum MessageQueueUserPermissionTupleFields | 27 | public enum MessageQueueUserPermissionTupleFields |
29 | { | 28 | { |
30 | MessageQueueUserPermission, | 29 | ComponentRef, |
31 | Component_, | 30 | MessageQueueRef, |
32 | MessageQueue_, | 31 | UserRef, |
33 | User_, | ||
34 | Permissions, | 32 | Permissions, |
35 | } | 33 | } |
36 | 34 | ||
@@ -46,28 +44,22 @@ namespace WixToolset.Msmq.Tuples | |||
46 | 44 | ||
47 | public IntermediateField this[MessageQueueUserPermissionTupleFields index] => this.Fields[(int)index]; | 45 | public IntermediateField this[MessageQueueUserPermissionTupleFields index] => this.Fields[(int)index]; |
48 | 46 | ||
49 | public string MessageQueueUserPermission | 47 | public string ComponentRef |
50 | { | 48 | { |
51 | get => this.Fields[(int)MessageQueueUserPermissionTupleFields.MessageQueueUserPermission].AsString(); | 49 | get => this.Fields[(int)MessageQueueUserPermissionTupleFields.ComponentRef].AsString(); |
52 | set => this.Set((int)MessageQueueUserPermissionTupleFields.MessageQueueUserPermission, value); | 50 | set => this.Set((int)MessageQueueUserPermissionTupleFields.ComponentRef, value); |
53 | } | 51 | } |
54 | 52 | ||
55 | public string Component_ | 53 | public string MessageQueueRef |
56 | { | 54 | { |
57 | get => this.Fields[(int)MessageQueueUserPermissionTupleFields.Component_].AsString(); | 55 | get => this.Fields[(int)MessageQueueUserPermissionTupleFields.MessageQueueRef].AsString(); |
58 | set => this.Set((int)MessageQueueUserPermissionTupleFields.Component_, value); | 56 | set => this.Set((int)MessageQueueUserPermissionTupleFields.MessageQueueRef, value); |
59 | } | 57 | } |
60 | 58 | ||
61 | public string MessageQueue_ | 59 | public string UserRef |
62 | { | 60 | { |
63 | get => this.Fields[(int)MessageQueueUserPermissionTupleFields.MessageQueue_].AsString(); | 61 | get => this.Fields[(int)MessageQueueUserPermissionTupleFields.UserRef].AsString(); |
64 | set => this.Set((int)MessageQueueUserPermissionTupleFields.MessageQueue_, value); | 62 | set => this.Set((int)MessageQueueUserPermissionTupleFields.UserRef, value); |
65 | } | ||
66 | |||
67 | public string User_ | ||
68 | { | ||
69 | get => this.Fields[(int)MessageQueueUserPermissionTupleFields.User_].AsString(); | ||
70 | set => this.Set((int)MessageQueueUserPermissionTupleFields.User_, value); | ||
71 | } | 63 | } |
72 | 64 | ||
73 | public int Permissions | 65 | public int Permissions |
diff --git a/src/wixext/WixToolset.Msmq.wixext.csproj b/src/wixext/WixToolset.Msmq.wixext.csproj index 2db75ff7..4c421bac 100644 --- a/src/wixext/WixToolset.Msmq.wixext.csproj +++ b/src/wixext/WixToolset.Msmq.wixext.csproj | |||
@@ -14,7 +14,6 @@ | |||
14 | <ItemGroup> | 14 | <ItemGroup> |
15 | <Content Include="$(MSBuildThisFileName).targets" /> | 15 | <Content Include="$(MSBuildThisFileName).targets" /> |
16 | <Content Include="msmq.xsd" PackagePath="tools" /> | 16 | <Content Include="msmq.xsd" PackagePath="tools" /> |
17 | <EmbeddedResource Include="tables.xml" /> | ||
18 | <EmbeddedResource Include="$(OutputPath)..\msmq.wixlib" /> | 17 | <EmbeddedResource Include="$(OutputPath)..\msmq.wixlib" /> |
19 | </ItemGroup> | 18 | </ItemGroup> |
20 | 19 | ||
diff --git a/src/wixext/tables.xml b/src/wixext/tables.xml deleted file mode 100644 index 5fdd1fad..00000000 --- a/src/wixext/tables.xml +++ /dev/null | |||
@@ -1,54 +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="MessageQueue" createSymbols="yes"> | ||
7 | <columnDefinition name="MessageQueue" type="string" length="72" primaryKey="yes" modularize="column" | ||
8 | category="identifier" description=""/> | ||
9 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
10 | keyTable="Component" keyColumn="1" category="identifier" description=""/> | ||
11 | <columnDefinition name="BasePriority" type="number" length="4" nullable="yes" | ||
12 | description=""/> | ||
13 | <columnDefinition name="JournalQuota" type="number" length="4" nullable="yes" | ||
14 | description=""/> | ||
15 | <columnDefinition name="Label" type="localized" length="255" modularize="property" escapeIdtCharacters="yes" | ||
16 | category="formatted" description=""/> | ||
17 | <columnDefinition name="MulticastAddress" type="string" length="255" nullable="yes" modularize="property" | ||
18 | category="formatted" description=""/> | ||
19 | <columnDefinition name="PathName" type="string" length="255" modularize="property" | ||
20 | category="formatted" description=""/> | ||
21 | <columnDefinition name="PrivLevel" type="number" length="4" nullable="yes" | ||
22 | description=""/> | ||
23 | <columnDefinition name="Quota" type="number" length="4" nullable="yes" | ||
24 | description=""/> | ||
25 | <columnDefinition name="ServiceTypeGuid" type="string" length="72" nullable="yes" modularize="property" | ||
26 | category="formatted" description=""/> | ||
27 | <columnDefinition name="Attributes" type="number" length="4" | ||
28 | description=""/> | ||
29 | </tableDefinition> | ||
30 | <tableDefinition name="MessageQueueUserPermission" createSymbols="yes"> | ||
31 | <columnDefinition name="MessageQueueUserPermission" type="string" length="72" primaryKey="yes" modularize="column" | ||
32 | category="identifier" description=""/> | ||
33 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
34 | keyTable="Component" keyColumn="1" category="identifier" description=""/> | ||
35 | <columnDefinition name="MessageQueue_" type="string" length="72" modularize="column" | ||
36 | keyTable="MessageQueue" keyColumn="1" category="identifier" description=""/> | ||
37 | <columnDefinition name="User_" type="string" length="72" modularize="column" | ||
38 | category="identifier" description=""/> | ||
39 | <columnDefinition name="Permissions" type="number" length="4" | ||
40 | description=""/> | ||
41 | </tableDefinition> | ||
42 | <tableDefinition name="MessageQueueGroupPermission" createSymbols="yes"> | ||
43 | <columnDefinition name="MessageQueueGroupPermission" type="string" length="72" primaryKey="yes" modularize="column" | ||
44 | category="identifier" description=""/> | ||
45 | <columnDefinition name="Component_" type="string" length="72" modularize="column" | ||
46 | keyTable="Component" keyColumn="1" category="identifier" description=""/> | ||
47 | <columnDefinition name="MessageQueue_" type="string" length="72" modularize="column" | ||
48 | keyTable="MessageQueue" keyColumn="1" category="identifier" description=""/> | ||
49 | <columnDefinition name="Group_" type="string" length="72" modularize="column" | ||
50 | category="identifier" description=""/> | ||
51 | <columnDefinition name="Permissions" type="number" length="4" | ||
52 | description=""/> | ||
53 | </tableDefinition> | ||
54 | </tableDefinitions> | ||