aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Iis/wixext/Symbols/IIsPropertySymbol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/Iis/wixext/Symbols/IIsPropertySymbol.cs')
-rw-r--r--src/ext/Iis/wixext/Symbols/IIsPropertySymbol.cs63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/ext/Iis/wixext/Symbols/IIsPropertySymbol.cs b/src/ext/Iis/wixext/Symbols/IIsPropertySymbol.cs
new file mode 100644
index 00000000..9cf67014
--- /dev/null
+++ b/src/ext/Iis/wixext/Symbols/IIsPropertySymbol.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.Iis
4{
5 using WixToolset.Data;
6 using WixToolset.Iis.Symbols;
7
8 public static partial class IisSymbolDefinitions
9 {
10 public static readonly IntermediateSymbolDefinition IIsProperty = new IntermediateSymbolDefinition(
11 IisSymbolDefinitionType.IIsProperty.ToString(),
12 new[]
13 {
14 new IntermediateFieldDefinition(nameof(IIsPropertySymbolFields.ComponentRef), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(IIsPropertySymbolFields.Attributes), IntermediateFieldType.Number),
16 new IntermediateFieldDefinition(nameof(IIsPropertySymbolFields.Value), IntermediateFieldType.String),
17 },
18 typeof(IIsPropertySymbol));
19 }
20}
21
22namespace WixToolset.Iis.Symbols
23{
24 using WixToolset.Data;
25
26 public enum IIsPropertySymbolFields
27 {
28 ComponentRef,
29 Attributes,
30 Value,
31 }
32
33 public class IIsPropertySymbol : IntermediateSymbol
34 {
35 public IIsPropertySymbol() : base(IisSymbolDefinitions.IIsProperty, null, null)
36 {
37 }
38
39 public IIsPropertySymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(IisSymbolDefinitions.IIsProperty, sourceLineNumber, id)
40 {
41 }
42
43 public IntermediateField this[IIsPropertySymbolFields index] => this.Fields[(int)index];
44
45 public string ComponentRef
46 {
47 get => this.Fields[(int)IIsPropertySymbolFields.ComponentRef].AsString();
48 set => this.Set((int)IIsPropertySymbolFields.ComponentRef, value);
49 }
50
51 public int Attributes
52 {
53 get => this.Fields[(int)IIsPropertySymbolFields.Attributes].AsNumber();
54 set => this.Set((int)IIsPropertySymbolFields.Attributes, value);
55 }
56
57 public string Value
58 {
59 get => this.Fields[(int)IIsPropertySymbolFields.Value].AsString();
60 set => this.Set((int)IIsPropertySymbolFields.Value, value);
61 }
62 }
63} \ No newline at end of file