aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Http/wixext/Symbols/WixHttpUrlReservationSymbol.cs
blob: 4aa4a5da9488451d7fe11029242d08922eef5432 (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
// 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.Http
{
    using WixToolset.Data;
    using WixToolset.Http.Symbols;

    public static partial class HttpSymbolDefinitions
    {
        public static readonly IntermediateSymbolDefinition WixHttpUrlReservation = new IntermediateSymbolDefinition(
            HttpSymbolDefinitionType.WixHttpUrlReservation.ToString(),
            new[]
            {
                new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.HandleExisting), IntermediateFieldType.Number),
                new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.Sddl), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.Url), IntermediateFieldType.String),
                new IntermediateFieldDefinition(nameof(WixHttpUrlReservationSymbolFields.ComponentRef), IntermediateFieldType.String),
            },
            typeof(WixHttpUrlReservationSymbol));
    }
}

namespace WixToolset.Http.Symbols
{
    using WixToolset.Data;

    public enum WixHttpUrlReservationSymbolFields
    {
        HandleExisting,
        Sddl,
        Url,
        ComponentRef,
    }

    public class WixHttpUrlReservationSymbol : IntermediateSymbol
    {
        public WixHttpUrlReservationSymbol() : base(HttpSymbolDefinitions.WixHttpUrlReservation, null, null)
        {
        }

        public WixHttpUrlReservationSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(HttpSymbolDefinitions.WixHttpUrlReservation, sourceLineNumber, id)
        {
        }

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

        public HandleExisting HandleExisting
        {
            get => (HandleExisting)this.Fields[(int)WixHttpUrlReservationSymbolFields.HandleExisting].AsNumber();
            set => this.Set((int)WixHttpUrlReservationSymbolFields.HandleExisting, (int)value);
        }

        public string Sddl
        {
            get => this.Fields[(int)WixHttpUrlReservationSymbolFields.Sddl].AsString();
            set => this.Set((int)WixHttpUrlReservationSymbolFields.Sddl, value);
        }

        public string Url
        {
            get => this.Fields[(int)WixHttpUrlReservationSymbolFields.Url].AsString();
            set => this.Set((int)WixHttpUrlReservationSymbolFields.Url, value);
        }

        public string ComponentRef
        {
            get => this.Fields[(int)WixHttpUrlReservationSymbolFields.ComponentRef].AsString();
            set => this.Set((int)WixHttpUrlReservationSymbolFields.ComponentRef, value);
        }
    }
}