diff options
Diffstat (limited to 'src/WixToolset.Data/Symbols/WixChainSymbol.cs')
-rw-r--r-- | src/WixToolset.Data/Symbols/WixChainSymbol.cs | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/WixToolset.Data/Symbols/WixChainSymbol.cs b/src/WixToolset.Data/Symbols/WixChainSymbol.cs new file mode 100644 index 00000000..8ec5fc63 --- /dev/null +++ b/src/WixToolset.Data/Symbols/WixChainSymbol.cs | |||
@@ -0,0 +1,61 @@ | |||
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.Data | ||
4 | { | ||
5 | using WixToolset.Data.Symbols; | ||
6 | |||
7 | public static partial class SymbolDefinitions | ||
8 | { | ||
9 | public static readonly IntermediateSymbolDefinition WixChain = new IntermediateSymbolDefinition( | ||
10 | SymbolDefinitionType.WixChain, | ||
11 | new[] | ||
12 | { | ||
13 | new IntermediateFieldDefinition(nameof(WixChainSymbolFields.Attributes), IntermediateFieldType.Number), | ||
14 | }, | ||
15 | typeof(WixChainSymbol)); | ||
16 | } | ||
17 | } | ||
18 | |||
19 | namespace WixToolset.Data.Symbols | ||
20 | { | ||
21 | using System; | ||
22 | |||
23 | public enum WixChainSymbolFields | ||
24 | { | ||
25 | Attributes, | ||
26 | } | ||
27 | |||
28 | [Flags] | ||
29 | public enum WixChainAttributes | ||
30 | { | ||
31 | None = 0x0, | ||
32 | DisableRollback = 0x1, | ||
33 | DisableSystemRestore = 0x2, | ||
34 | ParallelCache = 0x4, | ||
35 | } | ||
36 | |||
37 | public class WixChainSymbol : IntermediateSymbol | ||
38 | { | ||
39 | public WixChainSymbol() : base(SymbolDefinitions.WixChain, null, null) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | public WixChainSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixChain, sourceLineNumber, id) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | public IntermediateField this[WixChainSymbolFields index] => this.Fields[(int)index]; | ||
48 | |||
49 | public WixChainAttributes Attributes | ||
50 | { | ||
51 | get => (WixChainAttributes)(int)this.Fields[(int)WixChainSymbolFields.Attributes]; | ||
52 | set => this.Set((int)WixChainSymbolFields.Attributes, (int)value); | ||
53 | } | ||
54 | |||
55 | public bool DisableRollback => (this.Attributes & WixChainAttributes.DisableRollback) == WixChainAttributes.DisableRollback; | ||
56 | |||
57 | public bool DisableSystemRestore => (this.Attributes & WixChainAttributes.DisableSystemRestore) == WixChainAttributes.DisableSystemRestore; | ||
58 | |||
59 | public bool ParallelCache => (this.Attributes & WixChainAttributes.ParallelCache) == WixChainAttributes.ParallelCache; | ||
60 | } | ||
61 | } | ||