From 539c7ceb96d787bf485217d51c7a4bcad712b0b3 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 4 Jan 2021 14:32:17 -0800 Subject: Rename Tuple to Symbol --- .../Properties/launchSettings.json | 2 +- src/TablesAndTuples/ColumnDefinitionEnums.cs | 2 +- src/TablesAndTuples/Program.cs | 130 ++++++++++----------- src/TablesAndTuples/WixColumnDefinition.cs | 2 +- src/TablesAndTuples/WixTableDefinition.cs | 38 +++--- src/WixBuildTools.XsdGen/ElementCollection.cs | 82 ++++++------- 6 files changed, 128 insertions(+), 128 deletions(-) diff --git a/src/MessagesToMessages/Properties/launchSettings.json b/src/MessagesToMessages/Properties/launchSettings.json index a7e764be..dc7570f6 100644 --- a/src/MessagesToMessages/Properties/launchSettings.json +++ b/src/MessagesToMessages/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "TablesAndTuples": { + "TablesAndSymbols": { "commandName": "Project", "commandLineArgs": "E:\\src\\wixtoolset\\Core\\src\\WixToolset.Core\\Data\\messages.xml E:\\src\\wixtoolset\\Data\\src\\WixToolset.Data", "workingDirectory": "E:\\src\\wixtoolset\\Core\\src\\WixToolset.Core\\" diff --git a/src/TablesAndTuples/ColumnDefinitionEnums.cs b/src/TablesAndTuples/ColumnDefinitionEnums.cs index ac50e1cd..1499500e 100644 --- a/src/TablesAndTuples/ColumnDefinitionEnums.cs +++ b/src/TablesAndTuples/ColumnDefinitionEnums.cs @@ -1,4 +1,4 @@ -namespace TablesAndTuples +namespace TablesAndSymbols { public enum ColumnCategory { diff --git a/src/TablesAndTuples/Program.cs b/src/TablesAndTuples/Program.cs index 83766930..634acf9d 100644 --- a/src/TablesAndTuples/Program.cs +++ b/src/TablesAndTuples/Program.cs @@ -7,7 +7,7 @@ using System.Text.RegularExpressions; using System.Xml.Linq; using SimpleJson; -namespace TablesAndTuples +namespace TablesAndSymbols { class Program { @@ -65,11 +65,11 @@ namespace TablesAndTuples foreach (var tableDefinition in tableDefinitions) { - if (tableDefinition.Tupleless) + if (tableDefinition.Symbolless) { continue; } - var tupleType = tableDefinition.TupleDefinitionName; + var symbolType = tableDefinition.SymbolDefinitionName; var fields = new JsonArray(); var firstField = true; @@ -79,7 +79,7 @@ namespace TablesAndTuples if (firstField) { firstField = false; - if (tableDefinition.TupleIdIsPrimaryKey) + if (tableDefinition.SymbolIdIsPrimaryKey) { continue; } @@ -121,12 +121,12 @@ namespace TablesAndTuples var obj = new JsonObject { - { tupleType, fields } + { symbolType, fields } }; array.Add(obj); } - array.Sort(CompareTupleDefinitions); + array.Sort(CompareSymbolDefinitions); var strat = new PocoJsonSerializerStrategy(); var json = SimpleJson.SimpleJson.SerializeObject(array, strat); @@ -147,28 +147,28 @@ namespace TablesAndTuples private static void ReadJsonWriteCs(string inputPath, string outputFolder, string prefix) { var json = File.ReadAllText(inputPath); - var tuples = SimpleJson.SimpleJson.DeserializeObject(json) as JsonArray; + var symbols = SimpleJson.SimpleJson.DeserializeObject(json) as JsonArray; - var tupleNames = new List(); + var symbolNames = new List(); - foreach (var tupleDefinition in tuples.Cast()) + foreach (var symbolDefinition in symbols.Cast()) { - var tupleName = tupleDefinition.Keys.Single(); - var fields = tupleDefinition.Values.Single() as JsonArray; + var symbolName = symbolDefinition.Keys.Single(); + var fields = symbolDefinition.Values.Single() as JsonArray; var list = GetFields(fields).ToList(); - tupleNames.Add(tupleName); + symbolNames.Add(symbolName); - var text = GenerateTupleFileText(prefix, tupleName, list); + var text = GenerateSymbolFileText(prefix, symbolName, list); - var pathTuple = Path.Combine(outputFolder, tupleName + "Tuple.cs"); - Console.WriteLine("Writing: {0}", pathTuple); - File.WriteAllText(pathTuple, text); + var pathSymbol = Path.Combine(outputFolder, symbolName + "Symbol.cs"); + Console.WriteLine("Writing: {0}", pathSymbol); + File.WriteAllText(pathSymbol, text); } - var content = TupleNamesFileContent(prefix, tupleNames); - var pathNames = Path.Combine(outputFolder, String.Concat(prefix, "TupleDefinitions.cs")); + var content = SymbolNamesFileContent(prefix, symbolNames); + var pathNames = Path.Combine(outputFolder, String.Concat(prefix, "SymbolDefinitions.cs")); Console.WriteLine("Writing: {0}", pathNames); File.WriteAllText(pathNames, content); } @@ -215,7 +215,7 @@ namespace TablesAndTuples var unrealDef = " unreal: true,"; var endTableDef = String.Join(Environment.NewLine, - " tupleIdIsPrimaryKey: {1}", + " symbolIdIsPrimaryKey: {1}", " );", ""); var startAllTablesDef = String.Join(Environment.NewLine, @@ -234,8 +234,8 @@ namespace TablesAndTuples sb.AppendLine(startClassDef.Replace("{1}", ns).Replace("{2}", prefix)); foreach (var tableDefinition in tableDefinitions) { - var tupleDefinition = tableDefinition.Tupleless ? "null" : $"{prefix}TupleDefinitions.{tableDefinition.TupleDefinitionName}"; - sb.AppendLine(startTableDef.Replace("{1}", tableDefinition.VariableName).Replace("{2}", tableDefinition.Name).Replace("{3}", tupleDefinition)); + var symbolDefinition = tableDefinition.Symbolless ? "null" : $"{prefix}SymbolDefinitions.{tableDefinition.SymbolDefinitionName}"; + sb.AppendLine(startTableDef.Replace("{1}", tableDefinition.VariableName).Replace("{2}", tableDefinition.Name).Replace("{3}", symbolDefinition)); foreach (var columnDefinition in tableDefinition.Columns) { sb.Append(columnDef.Replace("{1}", columnDefinition.Name).Replace("{2}", columnDefinition.Type.ToString()).Replace("{3}", columnDefinition.Length.ToString()) @@ -287,7 +287,7 @@ namespace TablesAndTuples { sb.AppendLine(unrealDef); } - sb.AppendLine(endTableDef.Replace("{1}", tableDefinition.TupleIdIsPrimaryKey.ToString().ToLower())); + sb.AppendLine(endTableDef.Replace("{1}", tableDefinition.SymbolIdIsPrimaryKey.ToString().ToLower())); } sb.AppendLine(startAllTablesDef); foreach (var tableDefinition in tableDefinitions) @@ -300,7 +300,7 @@ namespace TablesAndTuples return sb.ToString(); } - private static string GenerateTupleFileText(string prefix, string tupleName, List<(string Name, string Type, string ClrType, string AsFunction)> tupleFields) + private static string GenerateSymbolFileText(string prefix, string symbolName, List<(string Name, string Type, string ClrType, string AsFunction)> symbolFields) { var ns = prefix ?? "Data"; var toString = String.IsNullOrEmpty(prefix) ? null : ".ToString()"; @@ -312,52 +312,52 @@ namespace TablesAndTuples "{"); var usingDataDef = " using WixToolset.Data;"; - var startTupleDef = String.Join(Environment.NewLine, - " using WixToolset.{2}.Tuples;", + var startSymbolDef = String.Join(Environment.NewLine, + " using WixToolset.{2}.Symbols;", "", - " public static partial class {3}TupleDefinitions", + " public static partial class {3}SymbolDefinitions", " {", - " public static readonly IntermediateTupleDefinition {1} = new IntermediateTupleDefinition(", - " {3}TupleDefinitionType.{1}{4},", + " public static readonly IntermediateSymbolDefinition {1} = new IntermediateSymbolDefinition(", + " {3}SymbolDefinitionType.{1}{4},", " new{5}[]", " {"); var fieldDef = - " new IntermediateFieldDefinition(nameof({1}TupleFields.{2}), IntermediateFieldType.{3}),"; - var endTupleDef = String.Join(Environment.NewLine, + " new IntermediateFieldDefinition(nameof({1}SymbolFields.{2}), IntermediateFieldType.{3}),"; + var endSymbolDef = String.Join(Environment.NewLine, " },", - " typeof({1}Tuple));", + " typeof({1}Symbol));", " }", "}", "", - "namespace WixToolset.{2}.Tuples", + "namespace WixToolset.{2}.Symbols", "{"); var startEnumDef = String.Join(Environment.NewLine, - " public enum {1}TupleFields", + " public enum {1}SymbolFields", " {"); var fieldEnum = " {2},"; - var startTuple = String.Join(Environment.NewLine, + var startSymbol = String.Join(Environment.NewLine, " }", "", - " public class {1}Tuple : IntermediateTuple", + " public class {1}Symbol : IntermediateSymbol", " {", - " public {1}Tuple() : base({3}TupleDefinitions.{1}, null, null)", + " public {1}Symbol() : base({3}SymbolDefinitions.{1}, null, null)", " {", " }", "", - " public {1}Tuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base({3}TupleDefinitions.{1}, sourceLineNumber, id)", + " public {1}Symbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base({3}SymbolDefinitions.{1}, sourceLineNumber, id)", " {", " }", "", - " public IntermediateField this[{1}TupleFields index] => this.Fields[(int)index];"); + " public IntermediateField this[{1}SymbolFields index] => this.Fields[(int)index];"); var fieldProp = String.Join(Environment.NewLine, "", " public {4} {2}", " {", - " get => {6}this.Fields[(int){1}TupleFields.{2}]{5};", - " set => this.Set((int){1}TupleFields.{2}, value);", + " get => {6}this.Fields[(int){1}SymbolFields.{2}]{5};", + " set => this.Set((int){1}SymbolFields.{2}, value);", " }"); - var endTuple = String.Join(Environment.NewLine, + var endSymbol = String.Join(Environment.NewLine, " }", "}"); @@ -368,36 +368,36 @@ namespace TablesAndTuples { sb.AppendLine(usingDataDef); } - sb.AppendLine(startTupleDef.Replace("{1}", tupleName).Replace("{2}", ns).Replace("{3}", prefix).Replace("{4}", toString).Replace("{5}", tupleFields.Any() ? null : " IntermediateFieldDefinition")); - foreach (var field in tupleFields) + sb.AppendLine(startSymbolDef.Replace("{1}", symbolName).Replace("{2}", ns).Replace("{3}", prefix).Replace("{4}", toString).Replace("{5}", symbolFields.Any() ? null : " IntermediateFieldDefinition")); + foreach (var field in symbolFields) { - sb.AppendLine(fieldDef.Replace("{1}", tupleName).Replace("{2}", field.Name).Replace("{3}", field.Type)); + sb.AppendLine(fieldDef.Replace("{1}", symbolName).Replace("{2}", field.Name).Replace("{3}", field.Type)); } - sb.AppendLine(endTupleDef.Replace("{1}", tupleName).Replace("{2}", ns).Replace("{3}", prefix)); + sb.AppendLine(endSymbolDef.Replace("{1}", symbolName).Replace("{2}", ns).Replace("{3}", prefix)); if (ns != "Data") { sb.AppendLine(usingDataDef); sb.AppendLine(); } - sb.AppendLine(startEnumDef.Replace("{1}", tupleName)); - foreach (var field in tupleFields) + sb.AppendLine(startEnumDef.Replace("{1}", symbolName)); + foreach (var field in symbolFields) { - sb.AppendLine(fieldEnum.Replace("{1}", tupleName).Replace("{2}", field.Name)); + sb.AppendLine(fieldEnum.Replace("{1}", symbolName).Replace("{2}", field.Name)); } - sb.AppendLine(startTuple.Replace("{1}", tupleName).Replace("{2}", ns).Replace("{3}", prefix)); - foreach (var field in tupleFields) + sb.AppendLine(startSymbol.Replace("{1}", symbolName).Replace("{2}", ns).Replace("{3}", prefix)); + foreach (var field in symbolFields) { var useCast = ns == "Data" && field.AsFunction != "AsPath()"; var cast = useCast ? $"({field.ClrType})" : null; var asFunction = useCast ? null : $".{field.AsFunction}"; - sb.AppendLine(fieldProp.Replace("{1}", tupleName).Replace("{2}", field.Name).Replace("{3}", field.Type).Replace("{4}", field.ClrType).Replace("{5}", asFunction).Replace("{6}", cast)); + sb.AppendLine(fieldProp.Replace("{1}", symbolName).Replace("{2}", field.Name).Replace("{3}", field.Type).Replace("{4}", field.ClrType).Replace("{5}", asFunction).Replace("{6}", cast)); } - sb.Append(endTuple); + sb.Append(endSymbol); return sb.ToString(); } - private static string TupleNamesFileContent(string prefix, List tupleNames) + private static string SymbolNamesFileContent(string prefix, List symbolNames) { var ns = prefix ?? "Data"; @@ -409,20 +409,20 @@ namespace TablesAndTuples " using System;", " using WixToolset.Data;", "", - " public enum {3}TupleDefinitionType", + " public enum {3}SymbolDefinitionType", " {"); var namesFormat = " {1},"; var midpoint = String.Join(Environment.NewLine, " }", "", - " public static partial class {3}TupleDefinitions", + " public static partial class {3}SymbolDefinitions", " {", " public static readonly Version Version = new Version(\"4.0.0\");", "", - " public static IntermediateTupleDefinition ByName(string name)", + " public static IntermediateSymbolDefinition ByName(string name)", " {", - " if (!Enum.TryParse(name, out {3}TupleDefinitionType type))", + " if (!Enum.TryParse(name, out {3}SymbolDefinitionType type))", " {", " return null;", " }", @@ -430,14 +430,14 @@ namespace TablesAndTuples " return ByType(type);", " }", "", - " public static IntermediateTupleDefinition ByType({3}TupleDefinitionType type)", + " public static IntermediateSymbolDefinition ByType({3}SymbolDefinitionType type)", " {", " switch (type)", " {"); var caseFormat = String.Join(Environment.NewLine, - " case {3}TupleDefinitionType.{1}:", - " return {3}TupleDefinitions.{1};", + " case {3}SymbolDefinitionType.{1}:", + " return {3}SymbolDefinitions.{1};", ""); var footer = String.Join(Environment.NewLine, @@ -451,14 +451,14 @@ namespace TablesAndTuples var sb = new StringBuilder(); sb.AppendLine(header.Replace("{2}", ns).Replace("{3}", prefix)); - foreach (var tupleName in tupleNames) + foreach (var symbolName in symbolNames) { - sb.AppendLine(namesFormat.Replace("{1}", tupleName).Replace("{2}", ns).Replace("{3}", prefix)); + sb.AppendLine(namesFormat.Replace("{1}", symbolName).Replace("{2}", ns).Replace("{3}", prefix)); } sb.AppendLine(midpoint.Replace("{2}", ns).Replace("{3}", prefix)); - foreach (var tupleName in tupleNames) + foreach (var symbolName in symbolNames) { - sb.AppendLine(caseFormat.Replace("{1}", tupleName).Replace("{2}", ns).Replace("{3}", prefix)); + sb.AppendLine(caseFormat.Replace("{1}", symbolName).Replace("{2}", ns).Replace("{3}", prefix)); } sb.AppendLine(footer); @@ -514,7 +514,7 @@ namespace TablesAndTuples throw new ArgumentException(fieldType); } - private static int CompareTupleDefinitions(object x, object y) + private static int CompareSymbolDefinitions(object x, object y) { var first = (JsonObject)x; var second = (JsonObject)y; diff --git a/src/TablesAndTuples/WixColumnDefinition.cs b/src/TablesAndTuples/WixColumnDefinition.cs index a40bacfa..2d60c9dc 100644 --- a/src/TablesAndTuples/WixColumnDefinition.cs +++ b/src/TablesAndTuples/WixColumnDefinition.cs @@ -1,7 +1,7 @@ using System; using System.Xml; -namespace TablesAndTuples +namespace TablesAndSymbols { class WixColumnDefinition { diff --git a/src/TablesAndTuples/WixTableDefinition.cs b/src/TablesAndTuples/WixTableDefinition.cs index a826a174..61dcbb0a 100644 --- a/src/TablesAndTuples/WixTableDefinition.cs +++ b/src/TablesAndTuples/WixTableDefinition.cs @@ -2,43 +2,43 @@ using System.Collections.Generic; using System.Linq; using System.Xml; -namespace TablesAndTuples +namespace TablesAndSymbols { class WixTableDefinition { - public WixTableDefinition(string name, IEnumerable columns, bool unreal, bool tupleless, string tupleDefinitionName, bool? tupleIdIsPrimaryKey) + public WixTableDefinition(string name, IEnumerable columns, bool unreal, bool symbolless, string symbolDefinitionName, bool? symbolIdIsPrimaryKey) { this.Name = name; this.VariableName = name.Replace("_", ""); this.Unreal = unreal; this.Columns = columns?.ToArray(); - this.Tupleless = tupleless; - this.TupleDefinitionName = tupleless ? null : tupleDefinitionName ?? this.VariableName; - this.TupleIdIsPrimaryKey = tupleIdIsPrimaryKey ?? DeriveTupleIdIsPrimaryKey(this.Columns); + this.Symbolless = symbolless; + this.SymbolDefinitionName = symbolless ? null : symbolDefinitionName ?? this.VariableName; + this.SymbolIdIsPrimaryKey = symbolIdIsPrimaryKey ?? DeriveSymbolIdIsPrimaryKey(this.Columns); } public string Name { get; } public string VariableName { get; } - public string TupleDefinitionName { get; } + public string SymbolDefinitionName { get; } public bool Unreal { get; } public WixColumnDefinition[] Columns { get; } - public bool TupleIdIsPrimaryKey { get; } + public bool SymbolIdIsPrimaryKey { get; } - public bool Tupleless { get; } + public bool Symbolless { get; } static WixTableDefinition Read(XmlReader reader) { var empty = reader.IsEmptyElement; string name = null; - string tupleDefinitionName = null; + string symbolDefinitionName = null; var unreal = false; - bool? tupleIdIsPrimaryKey = null; - var tupleless = false; + bool? symbolIdIsPrimaryKey = null; + var symbolless = false; while (reader.MoveToNextAttribute()) { @@ -47,14 +47,14 @@ namespace TablesAndTuples case "name": name = reader.Value; break; - case "tupleDefinitionName": - tupleDefinitionName = reader.Value; + case "symbolDefinitionName": + symbolDefinitionName = reader.Value; break; - case "tupleIdIsPrimaryKey": - tupleIdIsPrimaryKey = reader.Value.Equals("yes"); + case "symbolIdIsPrimaryKey": + symbolIdIsPrimaryKey = reader.Value.Equals("yes"); break; - case "tupleless": - tupleless = reader.Value.Equals("yes"); + case "symbolless": + symbolless = reader.Value.Equals("yes"); break; case "unreal": unreal = reader.Value.Equals("yes"); @@ -101,10 +101,10 @@ namespace TablesAndTuples } } - return new WixTableDefinition(name, columns.ToArray(), unreal, tupleless, tupleDefinitionName, tupleIdIsPrimaryKey); + return new WixTableDefinition(name, columns.ToArray(), unreal, symbolless, symbolDefinitionName, symbolIdIsPrimaryKey); } - static bool DeriveTupleIdIsPrimaryKey(WixColumnDefinition[] columns) + static bool DeriveSymbolIdIsPrimaryKey(WixColumnDefinition[] columns) { return columns[0].PrimaryKey && columns[0].Type == ColumnType.String && diff --git a/src/WixBuildTools.XsdGen/ElementCollection.cs b/src/WixBuildTools.XsdGen/ElementCollection.cs index e364dd11..3f0bff16 100644 --- a/src/WixBuildTools.XsdGen/ElementCollection.cs +++ b/src/WixBuildTools.XsdGen/ElementCollection.cs @@ -111,7 +111,7 @@ namespace WixToolset.Serialize if (collectionItem.ElementType.IsAssignableFrom(element.GetType())) { collectionItem.AddElement(element); - + if (!containerUsed) { this.containersUsed++; @@ -176,7 +176,7 @@ namespace WixToolset.Serialize } collectionItem.RemoveElement(element); - + if (collectionItem.Elements.Count == 0) { this.containersUsed--; @@ -277,7 +277,7 @@ namespace WixToolset.Serialize { return nestedFilter; } - + continue; } } @@ -353,10 +353,10 @@ namespace WixToolset.Serialize { throw new ArgumentException( String.Format( - CultureInfo.InvariantCulture, - "Element must be a subclass of {0}, but was of type {1}.", - this.elementType.Name, - element.GetType().Name), + CultureInfo.InvariantCulture, + "Element must be a subclass of {0}, but was of type {1}.", + this.elementType.Name, + element.GetType().Name), "element"); } @@ -374,10 +374,10 @@ namespace WixToolset.Serialize { throw new ArgumentException( String.Format( - CultureInfo.InvariantCulture, - "Element must be a subclass of {0}, but was of type {1}.", - this.elementType.Name, - element.GetType().Name), + CultureInfo.InvariantCulture, + "Element must be a subclass of {0}, but was of type {1}.", + this.elementType.Name, + element.GetType().Name), "element"); } @@ -454,13 +454,13 @@ namespace WixToolset.Serialize { if (this.collectionStack != null && this.collectionStack.Count > 0) { - CollectionTuple tuple = (CollectionTuple)this.collectionStack.Peek(); - object container = tuple.Collection.items[tuple.ContainerIndex]; - + CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek(); + object container = symbol.Collection.items[symbol.ContainerIndex]; + CollectionItem collectionItem = container as CollectionItem; if (collectionItem != null) { - return collectionItem.Elements[tuple.ItemIndex]; + return collectionItem.Elements[symbol.ItemIndex]; } throw new InvalidOperationException(String.Format( @@ -499,12 +499,12 @@ namespace WixToolset.Serialize } this.collectionStack = new Stack(); - this.collectionStack.Push(new CollectionTuple(this.collection)); + this.collectionStack.Push(new CollectionSymbol(this.collection)); } - CollectionTuple tuple = (CollectionTuple)this.collectionStack.Peek(); + CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek(); - if (this.FindNext(tuple)) + if (this.FindNext(symbol)) { return true; } @@ -532,50 +532,50 @@ namespace WixToolset.Serialize collection.Count)); } - CollectionTuple tuple = new CollectionTuple(collection); - this.collectionStack.Push(tuple); - this.FindNext(tuple); + CollectionSymbol symbol = new CollectionSymbol(collection); + this.collectionStack.Push(symbol); + this.FindNext(symbol); } /// - /// Finds the next item from a given tuple. + /// Finds the next item from a given symbol. /// - /// The tuple to start looking from. + /// The symbol to start looking from. /// True if a next element is found, false otherwise. - private bool FindNext(CollectionTuple tuple) + private bool FindNext(CollectionSymbol symbol) { - object container = tuple.Collection.items[tuple.ContainerIndex]; - + object container = symbol.Collection.items[symbol.ContainerIndex]; + CollectionItem collectionItem = container as CollectionItem; if (collectionItem != null) { - if (tuple.ItemIndex + 1 < collectionItem.Elements.Count) + if (symbol.ItemIndex + 1 < collectionItem.Elements.Count) { - tuple.ItemIndex++; + symbol.ItemIndex++; return true; } } ElementCollection elementCollection = container as ElementCollection; - if (elementCollection != null && elementCollection.Count > 0 && tuple.ItemIndex == -1) + if (elementCollection != null && elementCollection.Count > 0 && symbol.ItemIndex == -1) { - tuple.ItemIndex++; + symbol.ItemIndex++; this.PushCollection(elementCollection); return true; } - tuple.ItemIndex = 0; + symbol.ItemIndex = 0; - for (int i = tuple.ContainerIndex + 1; i < tuple.Collection.items.Count; ++i) + for (int i = symbol.ContainerIndex + 1; i < symbol.Collection.items.Count; ++i) { - object nestedContainer = tuple.Collection.items[i]; - + object nestedContainer = symbol.Collection.items[i]; + CollectionItem nestedCollectionItem = nestedContainer as CollectionItem; if (nestedCollectionItem != null) { if (nestedCollectionItem.Elements.Count > 0) { - tuple.ContainerIndex = i; + symbol.ContainerIndex = i; return true; } } @@ -583,7 +583,7 @@ namespace WixToolset.Serialize ElementCollection nestedElementCollection = nestedContainer as ElementCollection; if (nestedElementCollection != null && nestedElementCollection.Count > 0) { - tuple.ContainerIndex = i; + symbol.ContainerIndex = i; this.PushCollection(nestedElementCollection); return true; } @@ -596,23 +596,23 @@ namespace WixToolset.Serialize /// Class representing a single point in the collection. Consists of an ElementCollection, /// a container index, and an index into the container. /// - private class CollectionTuple + private class CollectionSymbol { private ElementCollection collection; private int containerIndex; private int itemIndex = -1; /// - /// Creates a new CollectionTuple. + /// Creates a new CollectionSymbol. /// - /// The collection for the tuple. - public CollectionTuple(ElementCollection collection) + /// The collection for the symbol. + public CollectionSymbol(ElementCollection collection) { this.collection = collection; } /// - /// Gets the collection for the tuple. + /// Gets the collection for the symbol. /// public ElementCollection Collection { -- cgit v1.2.3-55-g6feb