diff options
author | Rob Mensching <rob@firegiant.com> | 2021-05-04 22:48:12 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-05-04 22:48:12 -0700 |
commit | 7c8e34de56b3348c5a421cd0cced183e1394c5c7 (patch) | |
tree | c2f17867b49e33e0833eae2e1841a00b009c1a15 /src/ext/Iis/wixext/Symbols/CertificateHashSymbol.cs | |
parent | c5c87377d99beefe83a3470aab326d12bdf0f8a4 (diff) | |
download | wix-7c8e34de56b3348c5a421cd0cced183e1394c5c7.tar.gz wix-7c8e34de56b3348c5a421cd0cced183e1394c5c7.tar.bz2 wix-7c8e34de56b3348c5a421cd0cced183e1394c5c7.zip |
Move Iis.wixext into ext
Diffstat (limited to 'src/ext/Iis/wixext/Symbols/CertificateHashSymbol.cs')
-rw-r--r-- | src/ext/Iis/wixext/Symbols/CertificateHashSymbol.cs | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/ext/Iis/wixext/Symbols/CertificateHashSymbol.cs b/src/ext/Iis/wixext/Symbols/CertificateHashSymbol.cs new file mode 100644 index 00000000..866d474c --- /dev/null +++ b/src/ext/Iis/wixext/Symbols/CertificateHashSymbol.cs | |||
@@ -0,0 +1,55 @@ | |||
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.Symbols; | ||
7 | |||
8 | public static partial class IisSymbolDefinitions | ||
9 | { | ||
10 | public static readonly IntermediateSymbolDefinition CertificateHash = new IntermediateSymbolDefinition( | ||
11 | IisSymbolDefinitionType.CertificateHash.ToString(), | ||
12 | new[] | ||
13 | { | ||
14 | new IntermediateFieldDefinition(nameof(CertificateHashSymbolFields.CertificateRef), IntermediateFieldType.String), | ||
15 | new IntermediateFieldDefinition(nameof(CertificateHashSymbolFields.Hash), IntermediateFieldType.String), | ||
16 | }, | ||
17 | typeof(CertificateHashSymbol)); | ||
18 | } | ||
19 | } | ||
20 | |||
21 | namespace WixToolset.Iis.Symbols | ||
22 | { | ||
23 | using WixToolset.Data; | ||
24 | |||
25 | public enum CertificateHashSymbolFields | ||
26 | { | ||
27 | CertificateRef, | ||
28 | Hash, | ||
29 | } | ||
30 | |||
31 | public class CertificateHashSymbol : IntermediateSymbol | ||
32 | { | ||
33 | public CertificateHashSymbol() : base(IisSymbolDefinitions.CertificateHash, null, null) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | public CertificateHashSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(IisSymbolDefinitions.CertificateHash, sourceLineNumber, id) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | public IntermediateField this[CertificateHashSymbolFields index] => this.Fields[(int)index]; | ||
42 | |||
43 | public string CertificateRef | ||
44 | { | ||
45 | get => this.Fields[(int)CertificateHashSymbolFields.CertificateRef].AsString(); | ||
46 | set => this.Set((int)CertificateHashSymbolFields.CertificateRef, value); | ||
47 | } | ||
48 | |||
49 | public string Hash | ||
50 | { | ||
51 | get => this.Fields[(int)CertificateHashSymbolFields.Hash].AsString(); | ||
52 | set => this.Set((int)CertificateHashSymbolFields.Hash, value); | ||
53 | } | ||
54 | } | ||
55 | } \ No newline at end of file | ||