aboutsummaryrefslogtreecommitdiff
path: root/src/wixext/Symbols
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-06-27 14:35:57 -0700
committerRob Mensching <rob@firegiant.com>2020-06-27 14:43:36 -0700
commitbb9420d30cbcf7ad3506f92ab1c673f7f60ac03c (patch)
treec5c23d0c26299d79722179ea5e2a96d33e68dc42 /src/wixext/Symbols
parentf8c8adbe2c753ce6448369c49e87f9ff937af344 (diff)
downloadwix-bb9420d30cbcf7ad3506f92ab1c673f7f60ac03c.tar.gz
wix-bb9420d30cbcf7ad3506f92ab1c673f7f60ac03c.tar.bz2
wix-bb9420d30cbcf7ad3506f92ab1c673f7f60ac03c.zip
The Great Tuple to Symbol File Rename (tm)
Diffstat (limited to 'src/wixext/Symbols')
-rw-r--r--src/wixext/Symbols/HttpSymbolDefinitions.cs43
-rw-r--r--src/wixext/Symbols/WixHttpUrlAceSymbol.cs63
-rw-r--r--src/wixext/Symbols/WixHttpUrlReservationSymbol.cs71
3 files changed, 177 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}
diff --git a/src/wixext/Symbols/WixHttpUrlAceSymbol.cs b/src/wixext/Symbols/WixHttpUrlAceSymbol.cs
new file mode 100644
index 00000000..1d57bd52
--- /dev/null
+++ b/src/wixext/Symbols/WixHttpUrlAceSymbol.cs
@@ -0,0 +1,63 @@
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 WixToolset.Data;
6 using WixToolset.Http.Symbols;
7
8 public static partial class HttpSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition WixHttpUrlAce = new IntermediateSymbolDefinition(
11 HttpSymbolDefinitionType.WixHttpUrlAce.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(WixHttpUrlAceSymbolFields.WixHttpUrlReservationRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(WixHttpUrlAceSymbolFields.SecurityPrincipal), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(WixHttpUrlAceSymbolFields.Rights), IntermediateFieldType.Number),
17 },
18 typeof(WixHttpUrlAceSymbol));
19 }
20}
21
22namespace WixToolset.Http.Symbols
23{
24 using WixToolset.Data;
25
26 public enum WixHttpUrlAceSymbolFields
27 {
28 WixHttpUrlReservationRef,
29 SecurityPrincipal,
30 Rights,
31 }
32
33 public class WixHttpUrlAceSymbol : IntermediateSymbol
34 {
35 public WixHttpUrlAceSymbol() : base(HttpSymbolDefinitions.WixHttpUrlAce, null, null)
36 {
37 }
38
39 public WixHttpUrlAceSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpSymbolDefinitions.WixHttpUrlAce, sourceLineNumber, id)
40 {
41 }
42
43 public IntermediateField this[WixHttpUrlAceSymbolFields index] => this.Fields[(int)index];
44
45 public string WixHttpUrlReservationRef
46 {
47 get => this.Fields[(int)WixHttpUrlAceSymbolFields.WixHttpUrlReservationRef].AsString();
48 set => this.Set((int)WixHttpUrlAceSymbolFields.WixHttpUrlReservationRef, value);
49 }
50
51 public string SecurityPrincipal
52 {
53 get => this.Fields[(int)WixHttpUrlAceSymbolFields.SecurityPrincipal].AsString();
54 set => this.Set((int)WixHttpUrlAceSymbolFields.SecurityPrincipal, value);
55 }
56
57 public int Rights
58 {
59 get => this.Fields[(int)WixHttpUrlAceSymbolFields.Rights].AsNumber();
60 set => this.Set((int)WixHttpUrlAceSymbolFields.Rights, value);
61 }
62 }
63} \ No newline at end of file
diff --git a/src/wixext/Symbols/WixHttpUrlReservationSymbol.cs b/src/wixext/Symbols/WixHttpUrlReservationSymbol.cs
new file mode 100644
index 00000000..4bdc2fee
--- /dev/null
+++ b/src/wixext/Symbols/WixHttpUrlReservationSymbol.cs
@@ -0,0 +1,71 @@
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 WixToolset.Data;
6 using WixToolset.Http.Symbols;
7
8 public static partial class HttpSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition WixHttpUrlReservation = new IntermediateSymbolDefinition(
11 HttpSymbolDefinitionType.WixHttpUrlReservation.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.HandleExisting), IntermediateFieldType.Number),
15 new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.Sddl), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.Url), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.ComponentRef), IntermediateFieldType.String),
18 },
19 typeof(WixHttpUrlReservationSymbol));
20 }
21}
22
23namespace WixToolset.Http.Symbols
24{
25 using WixToolset.Data;
26
27 public enum WixHttpUrlReservationSymbolFields
28 {
29 HandleExisting,
30 Sddl,
31 Url,
32 ComponentRef,
33 }
34
35 public class WixHttpUrlReservationSymbol : IntermediateSymbol
36 {
37 public WixHttpUrlReservationSymbol() : base(HttpSymbolDefinitions.WixHttpUrlReservation, null, null)
38 {
39 }
40
41 public WixHttpUrlReservationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpSymbolDefinitions.WixHttpUrlReservation, sourceLineNumber, id)
42 {
43 }
44
45 public IntermediateField this[WixHttpUrlReservationSymbolFields index] => this.Fields[(int)index];
46
47 public int HandleExisting
48 {
49 get => this.Fields[(int)WixHttpUrlReservationSymbolFields.HandleExisting].AsNumber();
50 set => this.Set((int)WixHttpUrlReservationSymbolFields.HandleExisting, value);
51 }
52
53 public string Sddl
54 {
55 get => this.Fields[(int)WixHttpUrlReservationSymbolFields.Sddl].AsString();
56 set => this.Set((int)WixHttpUrlReservationSymbolFields.Sddl, value);
57 }
58
59 public string Url
60 {
61 get => this.Fields[(int)WixHttpUrlReservationSymbolFields.Url].AsString();
62 set => this.Set((int)WixHttpUrlReservationSymbolFields.Url, value);
63 }
64
65 public string ComponentRef
66 {
67 get => this.Fields[(int)WixHttpUrlReservationSymbolFields.ComponentRef].AsString();
68 set => this.Set((int)WixHttpUrlReservationSymbolFields.ComponentRef, value);
69 }
70 }
71} \ No newline at end of file