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
85
86
87
|
// 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.Sql
{
using WixToolset.Data;
using WixToolset.Sql.Symbols;
public static partial class SqlSymbolDefinitions
{
public static readonly IntermediateSymbolDefinition SqlString = new IntermediateSymbolDefinition(
SqlSymbolDefinitionType.SqlString.ToString(),
new[]
{
new IntermediateFieldDefinition(nameof(SqlStringSymbolFields.SqlDbRef), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(SqlStringSymbolFields.ComponentRef), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(SqlStringSymbolFields.SQL), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(SqlStringSymbolFields.UserRef), IntermediateFieldType.String),
new IntermediateFieldDefinition(nameof(SqlStringSymbolFields.Attributes), IntermediateFieldType.Number),
new IntermediateFieldDefinition(nameof(SqlStringSymbolFields.Sequence), IntermediateFieldType.Number),
},
typeof(SqlStringSymbol));
}
}
namespace WixToolset.Sql.Symbols
{
using WixToolset.Data;
public enum SqlStringSymbolFields
{
SqlDbRef,
ComponentRef,
SQL,
UserRef,
Attributes,
Sequence,
}
public class SqlStringSymbol : IntermediateSymbol
{
public SqlStringSymbol() : base(SqlSymbolDefinitions.SqlString, null, null)
{
}
public SqlStringSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SqlSymbolDefinitions.SqlString, sourceLineNumber, id)
{
}
public IntermediateField this[SqlStringSymbolFields index] => this.Fields[(int)index];
public string SqlDbRef
{
get => this.Fields[(int)SqlStringSymbolFields.SqlDbRef].AsString();
set => this.Set((int)SqlStringSymbolFields.SqlDbRef, value);
}
public string ComponentRef
{
get => this.Fields[(int)SqlStringSymbolFields.ComponentRef].AsString();
set => this.Set((int)SqlStringSymbolFields.ComponentRef, value);
}
public string SQL
{
get => this.Fields[(int)SqlStringSymbolFields.SQL].AsString();
set => this.Set((int)SqlStringSymbolFields.SQL, value);
}
public string UserRef
{
get => this.Fields[(int)SqlStringSymbolFields.UserRef].AsString();
set => this.Set((int)SqlStringSymbolFields.UserRef, value);
}
public int Attributes
{
get => this.Fields[(int)SqlStringSymbolFields.Attributes].AsNumber();
set => this.Set((int)SqlStringSymbolFields.Attributes, value);
}
public int? Sequence
{
get => this.Fields[(int)SqlStringSymbolFields.Sequence].AsNullableNumber();
set => this.Set((int)SqlStringSymbolFields.Sequence, value);
}
}
}
|