@joebigelow / wix / commits / afaa41df

Add support for sorting WixSearches in Core. Move error message CircularSearchReference here from UtilExtension. Remove redundant id field from WixSearchRelationTuple.

Add support for sorting WixSearches in Core. Move error message CircularSearchReference here from UtilExtension. Remove redundant id field from WixSearchRelationTuple.

Sean Hall committed Mar 27, 2020 at 15:35 UTC afaa41df8ac183e25051199ff8e993fa81cce6e2
2 files changed +6 -8
src/WixToolset.Data/ErrorMessages.cs
+6
@@ -173,6 +173,11 @@ namespace WixToolset.Data
173 return Message(sourceLineNumbers, Ids.CheckBoxValueOnlyValidWithCheckBox, "A {0} element was specified with Type='{1}' and a CheckBoxValue. Check box values can only be specified with Type='CheckBox'.", elementName, controlType);
174 }
175
176 + public static Message CircularSearchReference(string chain)
177 + {
178 + return Message(null, Ids.CircularSearchReference, "A circular reference of search ordering constraints was detected: {0}. Search ordering references must form a directed acyclic graph.", chain);
179 + }
180 +
181 public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType)
182 {
183 return Message(null, Ids.CollidingModularizationTypes, "The definition for the '{0}' table's '{1}' column is a foreign key relationship to the '{2}' table's column number {3}. The modularization types of the two column definitions differ: one is {4} and the other is {5}. Change one of the modularization types so that they match.", tableName, columnName, foreignTableName, foreignColumnNumber, modularizationType, foreignModularizationType);
@@ -2664,6 +2669,7 @@ namespace WixToolset.Data
2669 IntermediatesMustBeCompiled = 395,
2670 IntermediatesMustBeResolved = 396,
2671 MissingBundleSearch = 397,
2672 + CircularSearchReference = 398,
2673 }
2674 }
2675 }
src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs
-8
@@ -10,7 +10,6 @@ namespace WixToolset.Data
10 TupleDefinitionType.WixSearchRelation,
11 new[]
12 {
13 - new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.WixSearchRef), IntermediateFieldType.String),
13 new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.ParentSearchRef), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.Attributes), IntermediateFieldType.Number),
15 },
@@ -22,7 +21,6 @@ namespace WixToolset.Data.Tuples
21 {
22 public enum WixSearchRelationTupleFields
23 {
25 - WixSearchRef,
24 ParentSearchRef,
25 Attributes,
26 }
@@ -39,12 +37,6 @@ namespace WixToolset.Data.Tuples
37
38 public IntermediateField this[WixSearchRelationTupleFields index] => this.Fields[(int)index];
39
42 - public string WixSearchRef
43 - {
44 - get => (string)this.Fields[(int)WixSearchRelationTupleFields.WixSearchRef];
45 - set => this.Set((int)WixSearchRelationTupleFields.WixSearchRef, value);
46 - }
47 -
40 public string ParentSearchRef
41 {
42 get => (string)this.Fields[(int)WixSearchRelationTupleFields.ParentSearchRef];