From afaa41df8ac183e25051199ff8e993fa81cce6e2 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 27 Mar 2020 15:35:54 +1000 Subject: Add support for sorting WixSearches in Core. Move error message CircularSearchReference here from UtilExtension. Remove redundant id field from WixSearchRelationTuple. --- src/WixToolset.Data/ErrorMessages.cs | 6 ++++++ src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/WixToolset.Data/ErrorMessages.cs b/src/WixToolset.Data/ErrorMessages.cs index 4d972903..6759b14a 100644 --- a/src/WixToolset.Data/ErrorMessages.cs +++ b/src/WixToolset.Data/ErrorMessages.cs @@ -173,6 +173,11 @@ namespace WixToolset.Data 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); } + public static Message CircularSearchReference(string chain) + { + 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); + } + public static Message CollidingModularizationTypes(string tableName, string columnName, string foreignTableName, int foreignColumnNumber, string modularizationType, string foreignModularizationType) { 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 IntermediatesMustBeCompiled = 395, IntermediatesMustBeResolved = 396, MissingBundleSearch = 397, + CircularSearchReference = 398, } } } diff --git a/src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs b/src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs index 9c9b4662..559a41fa 100644 --- a/src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs +++ b/src/WixToolset.Data/Tuples/WixSearchRelationTuple.cs @@ -10,7 +10,6 @@ namespace WixToolset.Data TupleDefinitionType.WixSearchRelation, new[] { - new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.WixSearchRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.ParentSearchRef), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixSearchRelationTupleFields.Attributes), IntermediateFieldType.Number), }, @@ -22,7 +21,6 @@ namespace WixToolset.Data.Tuples { public enum WixSearchRelationTupleFields { - WixSearchRef, ParentSearchRef, Attributes, } @@ -39,12 +37,6 @@ namespace WixToolset.Data.Tuples public IntermediateField this[WixSearchRelationTupleFields index] => this.Fields[(int)index]; - public string WixSearchRef - { - get => (string)this.Fields[(int)WixSearchRelationTupleFields.WixSearchRef]; - set => this.Set((int)WixSearchRelationTupleFields.WixSearchRef, value); - } - public string ParentSearchRef { get => (string)this.Fields[(int)WixSearchRelationTupleFields.ParentSearchRef]; -- cgit v1.2.3-55-g6feb