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