From 9787570331b511bab73ac8f4f38a3b8cfa053ca5 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 24 Jun 2020 14:05:08 -0700 Subject: The Great Tuple to Symbol Rename (tm) --- src/WixToolset.Data/Intermediate.cs | 54 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'src/WixToolset.Data/Intermediate.cs') diff --git a/src/WixToolset.Data/Intermediate.cs b/src/WixToolset.Data/Intermediate.cs index d1c38cf0..30a50120 100644 --- a/src/WixToolset.Data/Intermediate.cs +++ b/src/WixToolset.Data/Intermediate.cs @@ -69,7 +69,7 @@ namespace WixToolset.Data /// Returns the loaded intermediate. public static Intermediate Load(string path, bool suppressVersionCheck = false) { - var creator = new SimpleTupleDefinitionCreator(); + var creator = new SimpleSymbolDefinitionCreator(); return Intermediate.Load(path, creator, suppressVersionCheck); } @@ -82,7 +82,7 @@ namespace WixToolset.Data /// Returns the loaded intermediate. public static Intermediate Load(Assembly assembly, string resourceName, bool suppressVersionCheck = false) { - var creator = new SimpleTupleDefinitionCreator(); + var creator = new SimpleSymbolDefinitionCreator(); return Intermediate.Load(assembly, resourceName, creator, suppressVersionCheck); } @@ -91,10 +91,10 @@ namespace WixToolset.Data /// /// Assembly with intermediate embedded in resource stream. /// Name of resource stream. - /// ITupleDefinitionCreator to use when reconstituting the intermediate. + /// ISymbolDefinitionCreator to use when reconstituting the intermediate. /// Suppress checking for wix.dll version mismatches. /// Returns the loaded intermediate. - public static Intermediate Load(Assembly assembly, string resourceName, ITupleDefinitionCreator creator, bool suppressVersionCheck = false) + public static Intermediate Load(Assembly assembly, string resourceName, ISymbolDefinitionCreator creator, bool suppressVersionCheck = false) { using (var wixout = WixOutput.Read(assembly, resourceName)) { @@ -106,10 +106,10 @@ namespace WixToolset.Data /// Loads an intermediate from a path on disk. /// /// Path to intermediate file saved on disk. - /// ITupleDefinitionCreator to use when reconstituting the intermediate. + /// ISymbolDefinitionCreator to use when reconstituting the intermediate. /// Suppress checking for wix.dll version mismatches. /// Returns the loaded intermediate. - public static Intermediate Load(string path, ITupleDefinitionCreator creator, bool suppressVersionCheck = false) + public static Intermediate Load(string path, ISymbolDefinitionCreator creator, bool suppressVersionCheck = false) { using (var wixout = WixOutput.Read(path)) { @@ -121,12 +121,12 @@ namespace WixToolset.Data /// Loads an intermediate from a WixOutput object. /// /// WixOutput object. - /// ITupleDefinitionCreator to use when reconstituting the intermediate. + /// ISymbolDefinitionCreator to use when reconstituting the intermediate. /// Suppress checking for wix.dll version mismatches. /// Returns the loaded intermediate. public static Intermediate Load(WixOutput wixOutput, bool suppressVersionCheck = false) { - var creator = new SimpleTupleDefinitionCreator(); + var creator = new SimpleSymbolDefinitionCreator(); return Intermediate.LoadIntermediate(wixOutput, creator, suppressVersionCheck); } @@ -134,10 +134,10 @@ namespace WixToolset.Data /// Loads an intermediate from a WixOutput object. /// /// WixOutput object. - /// ITupleDefinitionCreator to use when reconstituting the intermediate. + /// ISymbolDefinitionCreator to use when reconstituting the intermediate. /// Suppress checking for wix.dll version mismatches. /// Returns the loaded intermediate. - public static Intermediate Load(WixOutput wixOutput, ITupleDefinitionCreator creator, bool suppressVersionCheck = false) + public static Intermediate Load(WixOutput wixOutput, ISymbolDefinitionCreator creator, bool suppressVersionCheck = false) { return Intermediate.LoadIntermediate(wixOutput, creator, suppressVersionCheck); } @@ -150,7 +150,7 @@ namespace WixToolset.Data /// Returns the loaded intermediates public static IEnumerable Load(IEnumerable intermediateFiles) { - var creator = new SimpleTupleDefinitionCreator(); + var creator = new SimpleSymbolDefinitionCreator(); return Intermediate.Load(intermediateFiles, creator); } @@ -158,10 +158,10 @@ namespace WixToolset.Data /// Loads several intermediates from paths on disk using the same definitions. /// /// Paths to intermediate files saved on disk. - /// ITupleDefinitionCreator to use when reconstituting the intermediates. + /// ISymbolDefinitionCreator to use when reconstituting the intermediates. /// Suppress checking for wix.dll version mismatches. /// Returns the loaded intermediates - public static IEnumerable Load(IEnumerable intermediateFiles, ITupleDefinitionCreator creator, bool suppressVersionCheck = false) + public static IEnumerable Load(IEnumerable intermediateFiles, ISymbolDefinitionCreator creator, bool suppressVersionCheck = false) { var jsons = new Queue(); var intermediates = new List(); @@ -240,10 +240,10 @@ namespace WixToolset.Data /// /// Stream to intermediate file. /// Path name of intermediate file. - /// ITupleDefinitionCreator to use when reconstituting the intermediate. + /// ISymbolDefinitionCreator to use when reconstituting the intermediate. /// Suppress checking for wix.dll version mismatches. /// Returns the loaded intermediate. - private static Intermediate LoadIntermediate(WixOutput wixout, ITupleDefinitionCreator creator, bool suppressVersionCheck = false) + private static Intermediate LoadIntermediate(WixOutput wixout, ISymbolDefinitionCreator creator, bool suppressVersionCheck = false) { var data = wixout.GetData(WixOutputStreamName); var json = Intermediate.LoadJson(data, wixout.Uri, suppressVersionCheck); @@ -281,8 +281,8 @@ namespace WixToolset.Data /// Loads custom definitions in intermediate json into the creator. /// /// Json version of intermediate. - /// ITupleDefinitionCreator to use when reconstituting the intermediate. - private static void LoadDefinitions(JsonObject json, ITupleDefinitionCreator creator) + /// ISymbolDefinitionCreator to use when reconstituting the intermediate. + private static void LoadDefinitions(JsonObject json, ISymbolDefinitionCreator creator) { var definitionsJson = json.GetValueOrDefault("definitions"); @@ -290,8 +290,8 @@ namespace WixToolset.Data { foreach (JsonObject definitionJson in definitionsJson) { - var definition = IntermediateTupleDefinition.Deserialize(definitionJson); - creator.AddCustomTupleDefinition(definition); + var definition = IntermediateSymbolDefinition.Deserialize(definitionJson); + creator.AddCustomSymbolDefinition(definition); } } } @@ -301,9 +301,9 @@ namespace WixToolset.Data /// /// Json version of intermediate. /// Path to the intermediate. - /// ITupleDefinitionCreator to use when reconstituting the intermediate. + /// ISymbolDefinitionCreator to use when reconstituting the intermediate. /// The finalized intermediate. - private static Intermediate FinalizeLoad(JsonObject json, Uri baseUri, ITupleDefinitionCreator creator) + private static Intermediate FinalizeLoad(JsonObject json, Uri baseUri, ISymbolDefinitionCreator creator) { var id = json.GetValueOrDefault("id"); var level = json.GetValueOrDefault("level"); @@ -331,7 +331,7 @@ namespace WixToolset.Data private void SaveEmbedFiles(WixOutput wixout) { - var embeddedFields = this.Sections.SelectMany(s => s.Tuples) + var embeddedFields = this.Sections.SelectMany(s => s.Symbols) .SelectMany(t => t.Fields) .Where(f => f?.Type == IntermediateFieldType.Path) .Select(f => f.AsPath()) @@ -440,15 +440,15 @@ namespace WixToolset.Data return entryName; } - private Dictionary GetCustomDefinitionsInSections() + private Dictionary GetCustomDefinitionsInSections() { - var customDefinitions = new Dictionary(); + var customDefinitions = new Dictionary(); - foreach (var tuple in this.Sections.SelectMany(s => s.Tuples).Where(t => t.Definition.Type == TupleDefinitionType.MustBeFromAnExtension)) + foreach (var symbol in this.Sections.SelectMany(s => s.Symbols).Where(t => t.Definition.Type == SymbolDefinitionType.MustBeFromAnExtension)) { - if (!customDefinitions.ContainsKey(tuple.Definition.Name)) + if (!customDefinitions.ContainsKey(symbol.Definition.Name)) { - customDefinitions.Add(tuple.Definition.Name, tuple.Definition); + customDefinitions.Add(symbol.Definition.Name, symbol.Definition); } } -- cgit v1.2.3-55-g6feb