@joebigelow / wix-1 / commits / 2a9fdc41

Enumerate custom column categories and fix serialization code by hand

Rob Mensching committed Jun 12, 2020 at 06:48 UTC 2a9fdc41d80dc34f63239eb7dbb2c1be0b61c08d
2 files changed +136 -106
src/WixToolset.Data/Serialize/wix.cs
+103 -103
@@ -55497,157 +55497,157 @@ namespace WixToolset.Data.Serialize
55497 }
55498 if (("Text" == value))
55499 {
55500 - parsedValue = CategoryType.Text;
55500 + parsedValue = CategoryType.text;
55501 }
55502 else
55503 {
55504 if (("UpperCase" == value))
55505 {
55506 - parsedValue = CategoryType.UpperCase;
55506 + parsedValue = CategoryType.upperCase;
55507 }
55508 else
55509 {
55510 if (("LowerCase" == value))
55511 {
55512 - parsedValue = CategoryType.LowerCase;
55512 + parsedValue = CategoryType.lowerCase;
55513 }
55514 else
55515 {
55516 if (("Integer" == value))
55517 {
55518 - parsedValue = CategoryType.Integer;
55518 + parsedValue = CategoryType.integer;
55519 }
55520 else
55521 {
55522 if (("DoubleInteger" == value))
55523 {
55524 - parsedValue = CategoryType.DoubleInteger;
55524 + parsedValue = CategoryType.doubleInteger;
55525 }
55526 else
55527 {
55528 if (("TimeDate" == value))
55529 {
55530 - parsedValue = CategoryType.TimeDate;
55530 + parsedValue = CategoryType.timeDate;
55531 }
55532 else
55533 {
55534 if (("Identifier" == value))
55535 {
55536 - parsedValue = CategoryType.Identifier;
55536 + parsedValue = CategoryType.identifier;
55537 }
55538 else
55539 {
55540 if (("Property" == value))
55541 {
55542 - parsedValue = CategoryType.Property;
55542 + parsedValue = CategoryType.property;
55543 }
55544 else
55545 {
55546 if (("Filename" == value))
55547 {
55548 - parsedValue = CategoryType.Filename;
55548 + parsedValue = CategoryType.filename;
55549 }
55550 else
55551 {
55552 if (("WildCardFilename" == value))
55553 {
55554 - parsedValue = CategoryType.WildCardFilename;
55554 + parsedValue = CategoryType.wildCardFilename;
55555 }
55556 else
55557 {
55558 if (("Path" == value))
55559 {
55560 - parsedValue = CategoryType.Path;
55560 + parsedValue = CategoryType.path;
55561 }
55562 else
55563 {
55564 if (("Paths" == value))
55565 {
55566 - parsedValue = CategoryType.Paths;
55566 + parsedValue = CategoryType.paths;
55567 }
55568 else
55569 {
55570 if (("AnyPath" == value))
55571 {
55572 - parsedValue = CategoryType.AnyPath;
55572 + parsedValue = CategoryType.anyPath;
55573 }
55574 else
55575 {
55576 if (("DefaultDir" == value))
55577 {
55578 - parsedValue = CategoryType.DefaultDir;
55578 + parsedValue = CategoryType.defaultDir;
55579 }
55580 else
55581 {
55582 if (("RegPath" == value))
55583 {
55584 - parsedValue = CategoryType.RegPath;
55584 + parsedValue = CategoryType.regPath;
55585 }
55586 else
55587 {
55588 if (("Formatted" == value))
55589 {
55590 - parsedValue = CategoryType.Formatted;
55590 + parsedValue = CategoryType.formatted;
55591 }
55592 else
55593 {
55594 if (("FormattedSddl" == value))
55595 {
55596 - parsedValue = CategoryType.FormattedSddl;
55596 + parsedValue = CategoryType.formattedSddl;
55597 }
55598 else
55599 {
55600 if (("Template" == value))
55601 {
55602 - parsedValue = CategoryType.Template;
55602 + parsedValue = CategoryType.template;
55603 }
55604 else
55605 {
55606 if (("Condition" == value))
55607 {
55608 - parsedValue = CategoryType.Condition;
55608 + parsedValue = CategoryType.condition;
55609 }
55610 else
55611 {
55612 if (("Guid" == value))
55613 {
55614 - parsedValue = CategoryType.Guid;
55614 + parsedValue = CategoryType.guid;
55615 }
55616 else
55617 {
55618 if (("Version" == value))
55619 {
55620 - parsedValue = CategoryType.Version;
55620 + parsedValue = CategoryType.version;
55621 }
55622 else
55623 {
55624 if (("Language" == value))
55625 {
55626 - parsedValue = CategoryType.Language;
55626 + parsedValue = CategoryType.language;
55627 }
55628 else
55629 {
55630 if (("Binary" == value))
55631 {
55632 - parsedValue = CategoryType.Binary;
55632 + parsedValue = CategoryType.binary;
55633 }
55634 else
55635 {
55636 if (("CustomSource" == value))
55637 {
55638 - parsedValue = CategoryType.CustomSource;
55638 + parsedValue = CategoryType.customSource;
55639 }
55640 else
55641 {
55642 if (("Cabinet" == value))
55643 {
55644 - parsedValue = CategoryType.Cabinet;
55644 + parsedValue = CategoryType.cabinet;
55645 }
55646 else
55647 {
55648 if (("Shortcut" == value))
55649 {
55650 - parsedValue = CategoryType.Shortcut;
55650 + parsedValue = CategoryType.shortcut;
55651 }
55652 else
55653 {
@@ -55834,109 +55834,109 @@ namespace WixToolset.Data.Serialize
55834 }
55835 if (this.categoryFieldSet)
55836 {
55837 - if ((this.categoryField == CategoryType.Text))
55837 + if ((this.categoryField == CategoryType.text))
55838 {
55839 - writer.WriteAttributeString("Category", "Text");
55839 + writer.WriteAttributeString("Category", "text");
55840 }
55841 - if ((this.categoryField == CategoryType.UpperCase))
55841 + if ((this.categoryField == CategoryType.upperCase))
55842 {
55843 - writer.WriteAttributeString("Category", "UpperCase");
55843 + writer.WriteAttributeString("Category", "upperCase");
55844 }
55845 - if ((this.categoryField == CategoryType.LowerCase))
55845 + if ((this.categoryField == CategoryType.lowerCase))
55846 {
55847 - writer.WriteAttributeString("Category", "LowerCase");
55847 + writer.WriteAttributeString("Category", "lowerCase");
55848 }
55849 - if ((this.categoryField == CategoryType.Integer))
55849 + if ((this.categoryField == CategoryType.integer))
55850 {
55851 - writer.WriteAttributeString("Category", "Integer");
55851 + writer.WriteAttributeString("Category", "integer");
55852 }
55853 - if ((this.categoryField == CategoryType.DoubleInteger))
55853 + if ((this.categoryField == CategoryType.doubleInteger))
55854 {
55855 - writer.WriteAttributeString("Category", "DoubleInteger");
55855 + writer.WriteAttributeString("Category", "doubleInteger");
55856 }
55857 - if ((this.categoryField == CategoryType.TimeDate))
55857 + if ((this.categoryField == CategoryType.timeDate))
55858 {
55859 - writer.WriteAttributeString("Category", "TimeDate");
55859 + writer.WriteAttributeString("Category", "timeDate");
55860 }
55861 - if ((this.categoryField == CategoryType.Identifier))
55861 + if ((this.categoryField == CategoryType.identifier))
55862 {
55863 - writer.WriteAttributeString("Category", "Identifier");
55863 + writer.WriteAttributeString("Category", "identifier");
55864 }
55865 - if ((this.categoryField == CategoryType.Property))
55865 + if ((this.categoryField == CategoryType.property))
55866 {
55867 - writer.WriteAttributeString("Category", "Property");
55867 + writer.WriteAttributeString("Category", "property");
55868 }
55869 - if ((this.categoryField == CategoryType.Filename))
55869 + if ((this.categoryField == CategoryType.filename))
55870 {
55871 - writer.WriteAttributeString("Category", "Filename");
55871 + writer.WriteAttributeString("Category", "filename");
55872 }
55873 - if ((this.categoryField == CategoryType.WildCardFilename))
55873 + if ((this.categoryField == CategoryType.wildCardFilename))
55874 {
55875 - writer.WriteAttributeString("Category", "WildCardFilename");
55875 + writer.WriteAttributeString("Category", "wildCardFilename");
55876 }
55877 - if ((this.categoryField == CategoryType.Path))
55877 + if ((this.categoryField == CategoryType.path))
55878 {
55879 - writer.WriteAttributeString("Category", "Path");
55879 + writer.WriteAttributeString("Category", "path");
55880 }
55881 - if ((this.categoryField == CategoryType.Paths))
55881 + if ((this.categoryField == CategoryType.paths))
55882 {
55883 - writer.WriteAttributeString("Category", "Paths");
55883 + writer.WriteAttributeString("Category", "paths");
55884 }
55885 - if ((this.categoryField == CategoryType.AnyPath))
55885 + if ((this.categoryField == CategoryType.anyPath))
55886 {
55887 - writer.WriteAttributeString("Category", "AnyPath");
55887 + writer.WriteAttributeString("Category", "anyPath");
55888 }
55889 - if ((this.categoryField == CategoryType.DefaultDir))
55889 + if ((this.categoryField == CategoryType.defaultDir))
55890 {
55891 - writer.WriteAttributeString("Category", "DefaultDir");
55891 + writer.WriteAttributeString("Category", "defaultDir");
55892 }
55893 - if ((this.categoryField == CategoryType.RegPath))
55893 + if ((this.categoryField == CategoryType.regPath))
55894 {
55895 - writer.WriteAttributeString("Category", "RegPath");
55895 + writer.WriteAttributeString("Category", "regPath");
55896 }
55897 - if ((this.categoryField == CategoryType.Formatted))
55897 + if ((this.categoryField == CategoryType.formatted))
55898 {
55899 - writer.WriteAttributeString("Category", "Formatted");
55899 + writer.WriteAttributeString("Category", "formatted");
55900 }
55901 - if ((this.categoryField == CategoryType.FormattedSddl))
55901 + if ((this.categoryField == CategoryType.formattedSddl))
55902 {
55903 - writer.WriteAttributeString("Category", "FormattedSddl");
55903 + writer.WriteAttributeString("Category", "formattedSddl");
55904 }
55905 - if ((this.categoryField == CategoryType.Template))
55905 + if ((this.categoryField == CategoryType.template))
55906 {
55907 - writer.WriteAttributeString("Category", "Template");
55907 + writer.WriteAttributeString("Category", "template");
55908 }
55909 - if ((this.categoryField == CategoryType.Condition))
55909 + if ((this.categoryField == CategoryType.condition))
55910 {
55911 - writer.WriteAttributeString("Category", "Condition");
55911 + writer.WriteAttributeString("Category", "condition");
55912 }
55913 - if ((this.categoryField == CategoryType.Guid))
55913 + if ((this.categoryField == CategoryType.guid))
55914 {
55915 - writer.WriteAttributeString("Category", "Guid");
55915 + writer.WriteAttributeString("Category", "guid");
55916 }
55917 - if ((this.categoryField == CategoryType.Version))
55917 + if ((this.categoryField == CategoryType.version))
55918 {
55919 - writer.WriteAttributeString("Category", "Version");
55919 + writer.WriteAttributeString("Category", "version");
55920 }
55921 - if ((this.categoryField == CategoryType.Language))
55921 + if ((this.categoryField == CategoryType.language))
55922 {
55923 - writer.WriteAttributeString("Category", "Language");
55923 + writer.WriteAttributeString("Category", "language");
55924 }
55925 - if ((this.categoryField == CategoryType.Binary))
55925 + if ((this.categoryField == CategoryType.binary))
55926 {
55927 writer.WriteAttributeString("Category", "Binary");
55928 }
55929 - if ((this.categoryField == CategoryType.CustomSource))
55929 + if ((this.categoryField == CategoryType.customSource))
55930 {
55931 - writer.WriteAttributeString("Category", "CustomSource");
55931 + writer.WriteAttributeString("Category", "customSource");
55932 }
55933 - if ((this.categoryField == CategoryType.Cabinet))
55933 + if ((this.categoryField == CategoryType.cabinet))
55934 {
55935 - writer.WriteAttributeString("Category", "Cabinet");
55935 + writer.WriteAttributeString("Category", "cabinet");
55936 }
55937 - if ((this.categoryField == CategoryType.Shortcut))
55937 + if ((this.categoryField == CategoryType.shortcut))
55938 {
55939 - writer.WriteAttributeString("Category", "Shortcut");
55939 + writer.WriteAttributeString("Category", "shortcut");
55940 }
55941 }
55942 if (this.setFieldSet)
@@ -56090,57 +56090,57 @@ namespace WixToolset.Data.Serialize
56090
56091 NotSet = -1,
56092
56093 - Text,
56093 + text,
56094
56095 - UpperCase,
56095 + upperCase,
56096
56097 - LowerCase,
56097 + lowerCase,
56098
56099 - Integer,
56099 + integer,
56100
56101 - DoubleInteger,
56101 + doubleInteger,
56102
56103 - TimeDate,
56103 + timeDate,
56104
56105 - Identifier,
56105 + identifier,
56106
56107 - Property,
56107 + property,
56108
56109 - Filename,
56109 + filename,
56110
56111 - WildCardFilename,
56111 + wildCardFilename,
56112
56113 - Path,
56113 + path,
56114
56115 - Paths,
56115 + paths,
56116
56117 - AnyPath,
56117 + anyPath,
56118
56119 - DefaultDir,
56119 + defaultDir,
56120
56121 - RegPath,
56121 + regPath,
56122
56123 - Formatted,
56123 + formatted,
56124
56125 - FormattedSddl,
56125 + formattedSddl,
56126
56127 - Template,
56127 + template,
56128
56129 - Condition,
56129 + condition,
56130
56131 - Guid,
56131 + guid,
56132
56133 - Version,
56133 + version,
56134
56135 - Language,
56135 + language,
56136
56137 - Binary,
56137 + binary,
56138
56139 - CustomSource,
56139 + customSource,
56140
56141 - Cabinet,
56141 + cabinet,
56142
56143 - Shortcut,
56143 + shortcut,
56144 }
56145
56146 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
src/WixToolset.Data/Tuples/WixCustomTableColumnTuple.cs
+33 -3
@@ -59,6 +59,36 @@ namespace WixToolset.Data.Tuples
59 Unreal = 0x8,
60 }
61
62 + public enum WixCustomTableColumnCategoryType
63 + {
64 + Text,
65 + UpperCase,
66 + LowerCase,
67 + Integer,
68 + DoubleInteger,
69 + TimeDate,
70 + Identifier,
71 + Property,
72 + Filename,
73 + WildCardFilename,
74 + Path,
75 + Paths,
76 + AnyPath,
77 + DefaultDir,
78 + RegPath,
79 + Formatted,
80 + FormattedSddl,
81 + Template,
82 + Condition,
83 + Guid,
84 + Version,
85 + Language,
86 + Binary,
87 + CustomSource,
88 + Cabinet,
89 + Shortcut,
90 + }
91 +
92 public enum WixCustomTableColumnModularizeType
93 {
94 None,
@@ -138,10 +168,10 @@ namespace WixToolset.Data.Tuples
168 set => this.Set((int)WixCustomTableColumnTupleFields.KeyColumn, value);
169 }
170
141 - public string Category
171 + public WixCustomTableColumnCategoryType? Category
172 {
143 - get => (string)this.Fields[(int)WixCustomTableColumnTupleFields.Category];
144 - set => this.Set((int)WixCustomTableColumnTupleFields.Category, value);
173 + get => (WixCustomTableColumnCategoryType?)this.Fields[(int)WixCustomTableColumnTupleFields.Category].AsNullableNumber();
174 + set => this.Set((int)WixCustomTableColumnTupleFields.Category, (int?)value);
175 }
176
177 public string Set