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