aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Msmq/wixext/Symbols/MsmqSymbolDefinitions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Msmq/wixext/Symbols/MsmqSymbolDefinitions.cs')
-rw-r--r--src/ext/Msmq/wixext/Symbols/MsmqSymbolDefinitions.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/ext/Msmq/wixext/Symbols/MsmqSymbolDefinitions.cs b/src/ext/Msmq/wixext/Symbols/MsmqSymbolDefinitions.cs
new file mode 100644
index 00000000..229417fe
--- /dev/null
+++ b/src/ext/Msmq/wixext/Symbols/MsmqSymbolDefinitions.cs
@@ -0,0 +1,47 @@
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.Msmq
4{
5 using System;
6 using WixToolset.Data;
7
8 public enum MsmqSymbolDefinitionType
9 {
10 MessageQueue,
11 MessageQueueGroupPermission,
12 MessageQueueUserPermission,
13 }
14
15 public static partial class MsmqSymbolDefinitions
16 {
17 public static readonly Version Version = new Version("4.0.0");
18
19 public static IntermediateSymbolDefinition ByName(string name)
20 {
21 if (!Enum.TryParse(name, out MsmqSymbolDefinitionType type))
22 {
23 return null;
24 }
25
26 return ByType(type);
27 }
28
29 public static IntermediateSymbolDefinition ByType(MsmqSymbolDefinitionType type)
30 {
31 switch (type)
32 {
33 case MsmqSymbolDefinitionType.MessageQueue:
34 return MsmqSymbolDefinitions.MessageQueue;
35
36 case MsmqSymbolDefinitionType.MessageQueueGroupPermission:
37 return MsmqSymbolDefinitions.MessageQueueGroupPermission;
38
39 case MsmqSymbolDefinitionType.MessageQueueUserPermission:
40 return MsmqSymbolDefinitions.MessageQueueUserPermission;
41
42 default:
43 throw new ArgumentOutOfRangeException(nameof(type));
44 }
45 }
46 }
47}