diff options
author | Rob Mensching <rob@firegiant.com> | 2017-12-07 20:54:45 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-12-07 20:54:45 -0800 |
commit | 77dc8cd1acd5332aa0cb077c7e87d0678756969b (patch) | |
tree | 2867cf33ee1d2fc5c6bf93ae8a1f5663e3be5875 /src | |
parent | 221da62c05ef2b515eb507c77655514cd0ec32a4 (diff) | |
download | wix-77dc8cd1acd5332aa0cb077c7e87d0678756969b.tar.gz wix-77dc8cd1acd5332aa0cb077c7e87d0678756969b.tar.bz2 wix-77dc8cd1acd5332aa0cb077c7e87d0678756969b.zip |
Store WixMediaTemplate/@CompressionLevel as string
Diffstat (limited to 'src')
-rw-r--r-- | src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs | 13 | ||||
-rw-r--r-- | src/WixToolset.Data/Tuples/WixMediaTuple.cs | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs b/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs index bc8d2515..f7ac8bc4 100644 --- a/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs +++ b/src/WixToolset.Data/Tuples/WixMediaTemplateTuple.cs | |||
@@ -11,7 +11,7 @@ namespace WixToolset.Data | |||
11 | new[] | 11 | new[] |
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CabinetTemplate), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CabinetTemplate), IntermediateFieldType.String), |
14 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CompressionLevel), IntermediateFieldType.Number), | 14 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.CompressionLevel), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.DiskPrompt), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.DiskPrompt), IntermediateFieldType.String), |
16 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.VolumeLabel), IntermediateFieldType.String), | 16 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.VolumeLabel), IntermediateFieldType.String), |
17 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.MaximumUncompressedMediaSize), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(WixMediaTemplateTupleFields.MaximumUncompressedMediaSize), IntermediateFieldType.Number), |
@@ -53,10 +53,15 @@ namespace WixToolset.Data.Tuples | |||
53 | set => this.Set((int)WixMediaTemplateTupleFields.CabinetTemplate, value); | 53 | set => this.Set((int)WixMediaTemplateTupleFields.CabinetTemplate, value); |
54 | } | 54 | } |
55 | 55 | ||
56 | public CompressionLevel CompressionLevel | 56 | public CompressionLevel? CompressionLevel |
57 | { | 57 | { |
58 | get => (CompressionLevel)Enum.Parse(typeof(CompressionLevel), (string)this.Fields[(int)WixMediaTupleFields.CompressionLevel]?.Value, true); | 58 | get |
59 | set => this.Set((int)WixMediaTupleFields.CompressionLevel, value.ToString()); | 59 | { |
60 | var value = (string)this.Fields[(int)WixMediaTupleFields.CompressionLevel]?.Value; | ||
61 | return String.IsNullOrEmpty(value) ? null : (CompressionLevel?)Enum.Parse(typeof(CompressionLevel), value, true); | ||
62 | } | ||
63 | |||
64 | set => this.Set((int)WixMediaTupleFields.CompressionLevel, value?.ToString()); | ||
60 | } | 65 | } |
61 | 66 | ||
62 | public string DiskPrompt | 67 | public string DiskPrompt |
diff --git a/src/WixToolset.Data/Tuples/WixMediaTuple.cs b/src/WixToolset.Data/Tuples/WixMediaTuple.cs index 4da11de1..ec887df6 100644 --- a/src/WixToolset.Data/Tuples/WixMediaTuple.cs +++ b/src/WixToolset.Data/Tuples/WixMediaTuple.cs | |||
@@ -11,7 +11,7 @@ namespace WixToolset.Data | |||
11 | new[] | 11 | new[] |
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(WixMediaTupleFields.DiskId_), IntermediateFieldType.Number), | 13 | new IntermediateFieldDefinition(nameof(WixMediaTupleFields.DiskId_), IntermediateFieldType.Number), |
14 | new IntermediateFieldDefinition(nameof(WixMediaTupleFields.CompressionLevel), IntermediateFieldType.Number), | 14 | new IntermediateFieldDefinition(nameof(WixMediaTupleFields.CompressionLevel), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(WixMediaTupleFields.Layout), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixMediaTupleFields.Layout), IntermediateFieldType.String), |
16 | }, | 16 | }, |
17 | typeof(WixMediaTuple)); | 17 | typeof(WixMediaTuple)); |