summaryrefslogtreecommitdiff
path: root/src/ext/Http/wixext/Symbols/HttpCertificateSymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Http/wixext/Symbols/HttpCertificateSymbol.cs')
-rw-r--r--src/ext/Http/wixext/Symbols/HttpCertificateSymbol.cs103
1 files changed, 103 insertions, 0 deletions
diff --git a/src/ext/Http/wixext/Symbols/HttpCertificateSymbol.cs b/src/ext/Http/wixext/Symbols/HttpCertificateSymbol.cs
new file mode 100644
index 00000000..1e361b54
--- /dev/null
+++ b/src/ext/Http/wixext/Symbols/HttpCertificateSymbol.cs
@@ -0,0 +1,103 @@
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 HttpCertificate = new IntermediateSymbolDefinition(
11 HttpSymbolDefinitionType.HttpCertificate.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.Host), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.Port), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.Thumbprint), IntermediateFieldType.String),
17 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.AppId), IntermediateFieldType.String),
18 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.Store), IntermediateFieldType.String),
19 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.HandleExisting), IntermediateFieldType.Number),
20 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.CertificateType), IntermediateFieldType.Number),
21 new IntermediateFieldDefinition(nameof(HttpCertificateSymbolFields.ComponentRef), IntermediateFieldType.String),
22 },
23 typeof(HttpCertificateSymbol));
24 }
25}
26
27namespace WixToolset.Http.Symbols
28{
29 using WixToolset.Data;
30
31 public enum HttpCertificateSymbolFields
32 {
33 Host,
34 Port,
35 Thumbprint,
36 AppId,
37 Store,
38 HandleExisting,
39 CertificateType,
40 ComponentRef,
41 }
42
43 public class HttpCertificateSymbol : IntermediateSymbol
44 {
45 public HttpCertificateSymbol() : base(HttpSymbolDefinitions.HttpCertificate, null, null)
46 {
47 }
48
49 public HttpCertificateSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpSymbolDefinitions.HttpCertificate, sourceLineNumber, id)
50 {
51 }
52
53 public IntermediateField this[HttpCertificateSymbolFields index] => this.Fields[(int)index];
54
55 public string Host
56 {
57 get => this.Fields[(int)HttpCertificateSymbolFields.Host].AsString();
58 set => this.Set((int)HttpCertificateSymbolFields.Host, value);
59 }
60
61 public string Port
62 {
63 get => this.Fields[(int)HttpCertificateSymbolFields.Port].AsString();
64 set => this.Set((int)HttpCertificateSymbolFields.Port, value);
65 }
66
67 public string Thumbprint
68 {
69 get => this.Fields[(int)HttpCertificateSymbolFields.Thumbprint].AsString();
70 set => this.Set((int)HttpCertificateSymbolFields.Thumbprint, value);
71 }
72
73 public string AppId
74 {
75 get => this.Fields[(int)HttpCertificateSymbolFields.AppId].AsString();
76 set => this.Set((int)HttpCertificateSymbolFields.AppId, value);
77 }
78
79 public string Store
80 {
81 get => this.Fields[(int)HttpCertificateSymbolFields.Store].AsString();
82 set => this.Set((int)HttpCertificateSymbolFields.Store, value);
83 }
84
85 public HandleExisting HandleExisting
86 {
87 get => (HandleExisting)this.Fields[(int)HttpCertificateSymbolFields.HandleExisting].AsNumber();
88 set => this.Set((int)HttpCertificateSymbolFields.HandleExisting, (int)value);
89 }
90
91 public CertificateType CertificateType
92 {
93 get => (CertificateType)this.Fields[(int)HttpCertificateSymbolFields.CertificateType].AsNumber();
94 set => this.Set((int)HttpCertificateSymbolFields.CertificateType, (int)value);
95 }
96
97 public string ComponentRef
98 {
99 get => this.Fields[(int)HttpCertificateSymbolFields.ComponentRef].AsString();
100 set => this.Set((int)HttpCertificateSymbolFields.ComponentRef, value);
101 }
102 }
103}