diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2019-01-02 22:33:22 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2019-01-02 22:33:22 -0600 |
| commit | 2dcc519054be041ef5aa6cfac9dac13b0ea04eca (patch) | |
| tree | ba530ef5d4add27c9727d96d46809d6f1c426b3f /src/wixext/Tuples/SqlFileSpecTuple.cs | |
| parent | 6a497dc3559b8a5283405a1e1456af6a4c0bbdde (diff) | |
| download | wix-2dcc519054be041ef5aa6cfac9dac13b0ea04eca.tar.gz wix-2dcc519054be041ef5aa6cfac9dac13b0ea04eca.tar.bz2 wix-2dcc519054be041ef5aa6cfac9dac13b0ea04eca.zip | |
Add tuple definitions and fix test.
Diffstat (limited to 'src/wixext/Tuples/SqlFileSpecTuple.cs')
| -rw-r--r-- | src/wixext/Tuples/SqlFileSpecTuple.cs | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/wixext/Tuples/SqlFileSpecTuple.cs b/src/wixext/Tuples/SqlFileSpecTuple.cs new file mode 100644 index 00000000..9813ec83 --- /dev/null +++ b/src/wixext/Tuples/SqlFileSpecTuple.cs | |||
| @@ -0,0 +1,87 @@ | |||
| 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.Tuples; | ||
| 7 | |||
| 8 | public static partial class SqlTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition SqlFileSpec = new IntermediateTupleDefinition( | ||
| 11 | SqlTupleDefinitionType.SqlFileSpec.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(SqlFileSpecTupleFields.FileSpec), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(SqlFileSpecTupleFields.Name), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(SqlFileSpecTupleFields.Filename), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(SqlFileSpecTupleFields.Size), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(SqlFileSpecTupleFields.MaxSize), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(SqlFileSpecTupleFields.GrowthSize), IntermediateFieldType.String), | ||
| 20 | }, | ||
| 21 | typeof(SqlFileSpecTuple)); | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | namespace WixToolset.Sql.Tuples | ||
| 26 | { | ||
| 27 | using WixToolset.Data; | ||
| 28 | |||
| 29 | public enum SqlFileSpecTupleFields | ||
| 30 | { | ||
| 31 | FileSpec, | ||
| 32 | Name, | ||
| 33 | Filename, | ||
| 34 | Size, | ||
| 35 | MaxSize, | ||
| 36 | GrowthSize, | ||
| 37 | } | ||
| 38 | |||
| 39 | public class SqlFileSpecTuple : IntermediateTuple | ||
| 40 | { | ||
| 41 | public SqlFileSpecTuple() : base(SqlTupleDefinitions.SqlFileSpec, null, null) | ||
| 42 | { | ||
| 43 | } | ||
| 44 | |||
| 45 | public SqlFileSpecTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SqlTupleDefinitions.SqlFileSpec, sourceLineNumber, id) | ||
| 46 | { | ||
| 47 | } | ||
| 48 | |||
| 49 | public IntermediateField this[SqlFileSpecTupleFields index] => this.Fields[(int)index]; | ||
| 50 | |||
| 51 | public string FileSpec | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)SqlFileSpecTupleFields.FileSpec].AsString(); | ||
| 54 | set => this.Set((int)SqlFileSpecTupleFields.FileSpec, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Name | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)SqlFileSpecTupleFields.Name].AsString(); | ||
| 60 | set => this.Set((int)SqlFileSpecTupleFields.Name, value); | ||
| 61 | } | ||
| 62 | |||
| 63 | public string Filename | ||
| 64 | { | ||
| 65 | get => this.Fields[(int)SqlFileSpecTupleFields.Filename].AsString(); | ||
| 66 | set => this.Set((int)SqlFileSpecTupleFields.Filename, value); | ||
| 67 | } | ||
| 68 | |||
| 69 | public string Size | ||
| 70 | { | ||
| 71 | get => this.Fields[(int)SqlFileSpecTupleFields.Size].AsString(); | ||
| 72 | set => this.Set((int)SqlFileSpecTupleFields.Size, value); | ||
| 73 | } | ||
| 74 | |||
| 75 | public string MaxSize | ||
| 76 | { | ||
| 77 | get => this.Fields[(int)SqlFileSpecTupleFields.MaxSize].AsString(); | ||
| 78 | set => this.Set((int)SqlFileSpecTupleFields.MaxSize, value); | ||
| 79 | } | ||
| 80 | |||
| 81 | public string GrowthSize | ||
| 82 | { | ||
| 83 | get => this.Fields[(int)SqlFileSpecTupleFields.GrowthSize].AsString(); | ||
| 84 | set => this.Set((int)SqlFileSpecTupleFields.GrowthSize, value); | ||
| 85 | } | ||
| 86 | } | ||
| 87 | } \ No newline at end of file | ||
