diff options
Diffstat (limited to 'src/wixext/Symbols/SqlDatabaseSymbol.cs')
| -rw-r--r-- | src/wixext/Symbols/SqlDatabaseSymbol.cs | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/src/wixext/Symbols/SqlDatabaseSymbol.cs b/src/wixext/Symbols/SqlDatabaseSymbol.cs new file mode 100644 index 00000000..6f0820ac --- /dev/null +++ b/src/wixext/Symbols/SqlDatabaseSymbol.cs | |||
| @@ -0,0 +1,103 @@ | |||
| 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.Sql | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.Sql.Symbols; | ||
| 7 | |||
| 8 | public static partial class SqlSymbolDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateSymbolDefinition SqlDatabase = new IntermediateSymbolDefinition( | ||
| 11 | SqlSymbolDefinitionType.SqlDatabase.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.Server), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.Instance), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.Database), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.ComponentRef), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.UserRef), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.FileSpecRef), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.LogFileSpecRef), IntermediateFieldType.String), | ||
| 21 | new IntermediateFieldDefinition(nameof(SqlDatabaseSymbolFields.Attributes), IntermediateFieldType.Number), | ||
| 22 | }, | ||
| 23 | typeof(SqlDatabaseSymbol)); | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | namespace WixToolset.Sql.Symbols | ||
| 28 | { | ||
| 29 | using WixToolset.Data; | ||
| 30 | |||
| 31 | public enum SqlDatabaseSymbolFields | ||
| 32 | { | ||
| 33 | Server, | ||
| 34 | Instance, | ||
| 35 | Database, | ||
| 36 | ComponentRef, | ||
| 37 | UserRef, | ||
| 38 | FileSpecRef, | ||
| 39 | LogFileSpecRef, | ||
| 40 | Attributes, | ||
| 41 | } | ||
| 42 | |||
| 43 | public class SqlDatabaseSymbol : IntermediateSymbol | ||
| 44 | { | ||
| 45 | public SqlDatabaseSymbol() : base(SqlSymbolDefinitions.SqlDatabase, null, null) | ||
| 46 | { | ||
| 47 | } | ||
| 48 | |||
| 49 | public SqlDatabaseSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SqlSymbolDefinitions.SqlDatabase, sourceLineNumber, id) | ||
| 50 | { | ||
| 51 | } | ||
| 52 | |||
| 53 | public IntermediateField this[SqlDatabaseSymbolFields index] => this.Fields[(int)index]; | ||
| 54 | |||
| 55 | public string Server | ||
| 56 | { | ||
| 57 | get => this.Fields[(int)SqlDatabaseSymbolFields.Server].AsString(); | ||
| 58 | set => this.Set((int)SqlDatabaseSymbolFields.Server, value); | ||
| 59 | } | ||
| 60 | |||
| 61 | public string Instance | ||
| 62 | { | ||
| 63 | get => this.Fields[(int)SqlDatabaseSymbolFields.Instance].AsString(); | ||
| 64 | set => this.Set((int)SqlDatabaseSymbolFields.Instance, value); | ||
| 65 | } | ||
| 66 | |||
| 67 | public string Database | ||
| 68 | { | ||
| 69 | get => this.Fields[(int)SqlDatabaseSymbolFields.Database].AsString(); | ||
| 70 | set => this.Set((int)SqlDatabaseSymbolFields.Database, value); | ||
| 71 | } | ||
| 72 | |||
| 73 | public string ComponentRef | ||
| 74 | { | ||
| 75 | get => this.Fields[(int)SqlDatabaseSymbolFields.ComponentRef].AsString(); | ||
| 76 | set => this.Set((int)SqlDatabaseSymbolFields.ComponentRef, value); | ||
| 77 | } | ||
| 78 | |||
| 79 | public string UserRef | ||
| 80 | { | ||
| 81 | get => this.Fields[(int)SqlDatabaseSymbolFields.UserRef].AsString(); | ||
| 82 | set => this.Set((int)SqlDatabaseSymbolFields.UserRef, value); | ||
| 83 | } | ||
| 84 | |||
| 85 | public string FileSpecRef | ||
| 86 | { | ||
| 87 | get => this.Fields[(int)SqlDatabaseSymbolFields.FileSpecRef].AsString(); | ||
| 88 | set => this.Set((int)SqlDatabaseSymbolFields.FileSpecRef, value); | ||
| 89 | } | ||
| 90 | |||
| 91 | public string LogFileSpecRef | ||
| 92 | { | ||
| 93 | get => this.Fields[(int)SqlDatabaseSymbolFields.LogFileSpecRef].AsString(); | ||
| 94 | set => this.Set((int)SqlDatabaseSymbolFields.LogFileSpecRef, value); | ||
| 95 | } | ||
| 96 | |||
| 97 | public int Attributes | ||
| 98 | { | ||
| 99 | get => this.Fields[(int)SqlDatabaseSymbolFields.Attributes].AsNumber(); | ||
| 100 | set => this.Set((int)SqlDatabaseSymbolFields.Attributes, value); | ||
| 101 | } | ||
| 102 | } | ||
| 103 | } \ No newline at end of file | ||
