| 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 Example.Extension |
| 4 | { |
| 5 | using WixToolset.Data; |
| 6 | |
| 7 | public enum ExampleSymbolFields |
| 8 | { |
| 9 | ComponentRef, |
| 10 | Value, |
| 11 | } |
| 12 | |
| 13 | public class ExampleSymbol : IntermediateSymbol |
| 14 | { |
| 15 | public ExampleSymbol() : base(ExampleSymbolDefinitions.Example, null, null) |
| 16 | { |
| 17 | } |
| 18 | |
| 19 | public ExampleSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(ExampleSymbolDefinitions.Example, sourceLineNumber, id) |
| 20 | { |
| 21 | } |
| 22 | |
| 23 | public IntermediateField this[ExampleSymbolFields index] => this.Fields[(int)index]; |
| 24 | |
| 25 | public string ComponentRef |
| 26 | { |
| 27 | get => this.Fields[(int)ExampleSymbolFields.ComponentRef]?.AsString(); |
| 28 | set => this.Set((int)ExampleSymbolFields.ComponentRef, value); |
| 29 | } |
| 30 | |
| 31 | public string Value |
| 32 | { |
| 33 | get => this.Fields[(int)ExampleSymbolFields.Value]?.AsString(); |
| 34 | set => this.Set((int)ExampleSymbolFields.Value, value); |
| 35 | } |
| 36 | } |
| 37 | } |