diff options
Diffstat (limited to 'src/wixext/Tuples/CertificateTuple.cs')
-rw-r--r-- | src/wixext/Tuples/CertificateTuple.cs | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/src/wixext/Tuples/CertificateTuple.cs b/src/wixext/Tuples/CertificateTuple.cs new file mode 100644 index 00000000..9e04b783 --- /dev/null +++ b/src/wixext/Tuples/CertificateTuple.cs | |||
@@ -0,0 +1,111 @@ | |||
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.Iis | ||
4 | { | ||
5 | using WixToolset.Data; | ||
6 | using WixToolset.Iis.Tuples; | ||
7 | |||
8 | public static partial class IisTupleDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateTupleDefinition Certificate = new IntermediateTupleDefinition( | ||
11 | IisTupleDefinitionType.Certificate.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.Certificate), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.Component_), IntermediateFieldType.String), | ||
16 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.Name), IntermediateFieldType.String), | ||
17 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.StoreLocation), IntermediateFieldType.Number), | ||
18 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.StoreName), IntermediateFieldType.String), | ||
19 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.Attributes), IntermediateFieldType.Number), | ||
20 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.Binary_), IntermediateFieldType.String), | ||
21 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.CertificatePath), IntermediateFieldType.String), | ||
22 | new IntermediateFieldDefinition(nameof(CertificateTupleFields.PFXPassword), IntermediateFieldType.String), | ||
23 | }, | ||
24 | typeof(CertificateTuple)); | ||
25 | } | ||
26 | } | ||
27 | |||
28 | namespace WixToolset.Iis.Tuples | ||
29 | { | ||
30 | using WixToolset.Data; | ||
31 | |||
32 | public enum CertificateTupleFields | ||
33 | { | ||
34 | Certificate, | ||
35 | Component_, | ||
36 | Name, | ||
37 | StoreLocation, | ||
38 | StoreName, | ||
39 | Attributes, | ||
40 | Binary_, | ||
41 | CertificatePath, | ||
42 | PFXPassword, | ||
43 | } | ||
44 | |||
45 | public class CertificateTuple : IntermediateTuple | ||
46 | { | ||
47 | public CertificateTuple() : base(IisTupleDefinitions.Certificate, null, null) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public CertificateTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(IisTupleDefinitions.Certificate, sourceLineNumber, id) | ||
52 | { | ||
53 | } | ||
54 | |||
55 | public IntermediateField this[CertificateTupleFields index] => this.Fields[(int)index]; | ||
56 | |||
57 | public string Certificate | ||
58 | { | ||
59 | get => this.Fields[(int)CertificateTupleFields.Certificate].AsString(); | ||
60 | set => this.Set((int)CertificateTupleFields.Certificate, value); | ||
61 | } | ||
62 | |||
63 | public string Component_ | ||
64 | { | ||
65 | get => this.Fields[(int)CertificateTupleFields.Component_].AsString(); | ||
66 | set => this.Set((int)CertificateTupleFields.Component_, value); | ||
67 | } | ||
68 | |||
69 | public string Name | ||
70 | { | ||
71 | get => this.Fields[(int)CertificateTupleFields.Name].AsString(); | ||
72 | set => this.Set((int)CertificateTupleFields.Name, value); | ||
73 | } | ||
74 | |||
75 | public int StoreLocation | ||
76 | { | ||
77 | get => this.Fields[(int)CertificateTupleFields.StoreLocation].AsNumber(); | ||
78 | set => this.Set((int)CertificateTupleFields.StoreLocation, value); | ||
79 | } | ||
80 | |||
81 | public string StoreName | ||
82 | { | ||
83 | get => this.Fields[(int)CertificateTupleFields.StoreName].AsString(); | ||
84 | set => this.Set((int)CertificateTupleFields.StoreName, value); | ||
85 | } | ||
86 | |||
87 | public int Attributes | ||
88 | { | ||
89 | get => this.Fields[(int)CertificateTupleFields.Attributes].AsNumber(); | ||
90 | set => this.Set((int)CertificateTupleFields.Attributes, value); | ||
91 | } | ||
92 | |||
93 | public string Binary_ | ||
94 | { | ||
95 | get => this.Fields[(int)CertificateTupleFields.Binary_].AsString(); | ||
96 | set => this.Set((int)CertificateTupleFields.Binary_, value); | ||
97 | } | ||
98 | |||
99 | public string CertificatePath | ||
100 | { | ||
101 | get => this.Fields[(int)CertificateTupleFields.CertificatePath].AsString(); | ||
102 | set => this.Set((int)CertificateTupleFields.CertificatePath, value); | ||
103 | } | ||
104 | |||
105 | public string PFXPassword | ||
106 | { | ||
107 | get => this.Fields[(int)CertificateTupleFields.PFXPassword].AsString(); | ||
108 | set => this.Set((int)CertificateTupleFields.PFXPassword, value); | ||
109 | } | ||
110 | } | ||
111 | } \ No newline at end of file | ||