aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/WixDeltaPatchFileTuple.cs
blob: 68f327f4d7e8d7f21015625c7d6c98ea06e9d62d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// 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.

namespace WixToolset.Data
{
    using WixToolset.Data.Tuples;

    public static partial class TupleDefinitions
    {
        public static readonly IntermediateTupleDefinition WixDeltaPatchFile = new IntermediateTupleDefinition(
            TupleDefinitionType.WixDeltaPatchFile,
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.File_), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.RetainLengths), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreOffsets), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.IgnoreLengths), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.RetainOffsets), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixDeltaPatchFileTupleFields.SymbolPaths), IntermediateFieldType.String),
            },
            typeof(WixDeltaPatchFileTuple));
    }
}

namespace WixToolset.Data.Tuples
{
    public enum WixDeltaPatchFileTupleFields
    {
        File_,
        RetainLengths,
        IgnoreOffsets,
        IgnoreLengths,
        RetainOffsets,
        SymbolPaths,
    }

    public class WixDeltaPatchFileTuple : IntermediateTuple
    {
        public WixDeltaPatchFileTuple() : base(TupleDefinitions.WixDeltaPatchFile, null, null)
        {
        }

        public WixDeltaPatchFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(TupleDefinitions.WixDeltaPatchFile, sourceLineNumber, id)
        {
        }

        public IntermediateField this[WixDeltaPatchFileTupleFields index] => this.Fields[(int)index];

        public string File_
        {
            get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.File_]?.Value;
            set => this.Set((int)WixDeltaPatchFileTupleFields.File_, value);
        }

        public string RetainLengths
        {
            get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.RetainLengths]?.Value;
            set => this.Set((int)WixDeltaPatchFileTupleFields.RetainLengths, value);
        }

        public string IgnoreOffsets
        {
            get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.IgnoreOffsets]?.Value;
            set => this.Set((int)WixDeltaPatchFileTupleFields.IgnoreOffsets, value);
        }

        public string IgnoreLengths
        {
            get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.IgnoreLengths]?.Value;
            set => this.Set((int)WixDeltaPatchFileTupleFields.IgnoreLengths, value);
        }

        public string RetainOffsets
        {
            get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.RetainOffsets]?.Value;
            set => this.Set((int)WixDeltaPatchFileTupleFields.RetainOffsets, value);
        }

        public string SymbolPaths
        {
            get => (string)this.Fields[(int)WixDeltaPatchFileTupleFields.SymbolPaths]?.Value;
            set => this.Set((int)WixDeltaPatchFileTupleFields.SymbolPaths, value);
        }
    }
}