aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/WixToolset.Data/Tuples/WixFileSearchTuple.cs33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs b/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs
index 27c5cc83..4c0cedf3 100644
--- a/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs
+++ b/src/WixToolset.Data/Tuples/WixFileSearchTuple.cs
@@ -10,7 +10,6 @@ namespace WixToolset.Data
10 TupleDefinitionType.WixFileSearch, 10 TupleDefinitionType.WixFileSearch,
11 new[] 11 new[]
12 { 12 {
13 new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.WixSearchRef), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.Path), IntermediateFieldType.String), 13 new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.Path), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MinVersion), IntermediateFieldType.String), 14 new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MinVersion), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MaxVersion), IntermediateFieldType.String), 15 new IntermediateFieldDefinition(nameof(WixFileSearchTupleFields.MaxVersion), IntermediateFieldType.String),
@@ -27,9 +26,10 @@ namespace WixToolset.Data
27 26
28namespace WixToolset.Data.Tuples 27namespace WixToolset.Data.Tuples
29{ 28{
29 using System;
30
30 public enum WixFileSearchTupleFields 31 public enum WixFileSearchTupleFields
31 { 32 {
32 WixSearchRef,
33 Path, 33 Path,
34 MinVersion, 34 MinVersion,
35 MaxVersion, 35 MaxVersion,
@@ -41,6 +41,21 @@ namespace WixToolset.Data.Tuples
41 Attributes, 41 Attributes,
42 } 42 }
43 43
44 [Flags]
45 public enum WixFileSearchAttributes
46 {
47 Default = 0x001,
48 MinVersionInclusive = 0x002,
49 MaxVersionInclusive = 0x004,
50 MinSizeInclusive = 0x008,
51 MaxSizeInclusive = 0x010,
52 MinDateInclusive = 0x020,
53 MaxDateInclusive = 0x040,
54 WantVersion = 0x080,
55 WantExists = 0x100,
56 IsDirectory = 0x200,
57 }
58
44 public class WixFileSearchTuple : IntermediateTuple 59 public class WixFileSearchTuple : IntermediateTuple
45 { 60 {
46 public WixFileSearchTuple() : base(TupleDefinitions.WixFileSearch, null, null) 61 public WixFileSearchTuple() : base(TupleDefinitions.WixFileSearch, null, null)
@@ -53,12 +68,6 @@ namespace WixToolset.Data.Tuples
53 68
54 public IntermediateField this[WixFileSearchTupleFields index] => this.Fields[(int)index]; 69 public IntermediateField this[WixFileSearchTupleFields index] => this.Fields[(int)index];
55 70
56 public string WixSearchRef
57 {
58 get => (string)this.Fields[(int)WixFileSearchTupleFields.WixSearchRef];
59 set => this.Set((int)WixFileSearchTupleFields.WixSearchRef, value);
60 }
61
62 public string Path 71 public string Path
63 { 72 {
64 get => (string)this.Fields[(int)WixFileSearchTupleFields.Path]; 73 get => (string)this.Fields[(int)WixFileSearchTupleFields.Path];
@@ -107,10 +116,10 @@ namespace WixToolset.Data.Tuples
107 set => this.Set((int)WixFileSearchTupleFields.Languages, value); 116 set => this.Set((int)WixFileSearchTupleFields.Languages, value);
108 } 117 }
109 118
110 public int Attributes 119 public WixFileSearchAttributes Attributes
111 { 120 {
112 get => (int)this.Fields[(int)WixFileSearchTupleFields.Attributes]; 121 get => (WixFileSearchAttributes)this.Fields[(int)WixFileSearchTupleFields.Attributes].AsNumber();
113 set => this.Set((int)WixFileSearchTupleFields.Attributes, value); 122 set => this.Set((int)WixFileSearchTupleFields.Attributes, (int)value);
114 } 123 }
115 } 124 }
116} \ No newline at end of file 125}