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