From e08086b633b701906ec7bc6246eec3148bc1d9d6 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 1 Oct 2017 14:26:14 -0700 Subject: Minor code cleanup --- src/WixToolset.BuildTasks/WixCommandLineBuilder.cs | 7 +++--- src/WixToolset.BuildTasks/wix.targets | 28 +++++++++++----------- src/WixToolset.Core/Linker.cs | 13 ++++------ src/wix/Program.cs | 2 -- 4 files changed, 21 insertions(+), 29 deletions(-) diff --git a/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs b/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs index 3f3084a3..a979dbb0 100644 --- a/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs +++ b/src/WixToolset.BuildTasks/WixCommandLineBuilder.cs @@ -3,10 +3,9 @@ namespace WixToolset.BuildTasks { using System; - using System.Diagnostics; + using System.Collections.Generic; using System.Globalization; using System.IO; - using System.Text; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; @@ -17,7 +16,7 @@ namespace WixToolset.BuildTasks public class WixCommandLineBuilder : CommandLineBuilder { internal const int Unspecified = -1; - + /// /// Append a switch to the command line if the value has been specified. /// @@ -131,7 +130,7 @@ namespace WixToolset.BuildTasks if (!File.Exists(resolvedPath)) { - // Extesnion wasn't found, just set it to the extension name passed in + // Extension wasn't found, just set it to the extension name passed in resolvedPath = extension.ItemSpec; } } diff --git a/src/WixToolset.BuildTasks/wix.targets b/src/WixToolset.BuildTasks/wix.targets index bcf0163b..4da03c6f 100644 --- a/src/WixToolset.BuildTasks/wix.targets +++ b/src/WixToolset.BuildTasks/wix.targets @@ -441,9 +441,9 @@ - - - + en-US,en;en-GB,en This will build 2 targets, outputing to en-US and en-GB sub-folders. Light will first look for strings in the first culture (en-US or en-GB) then the second (en). - Cultures of .wxl files will be used when the Culture property is not set. The culture of a + Cultures of .wxl files will be used when the Culture property is not set. The culture of a .wxl file is determined by the Culture attribute in the WixLocalization element in the file - Sets the OutputFolder metadata on each culture group. In most cases this is the same as the - first culture in the culture group. When the Culture's property is unspecified and no .wxl - files are provided this is the same as the output directory. When the Culture's property + Sets the OutputFolder metadata on each culture group. In most cases this is the same as the + first culture in the culture group. When the Culture's property is unspecified and no .wxl + files are provided this is the same as the output directory. When the Culture's property specifies a single culture group and no .wxl files are provided this is the same as the output directory. @@ -1206,7 +1206,7 @@ SourceFilesProjectOutputGroup; ContentFilesProjectOutputGroup" /> - diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 166894b9..1e5b6e96 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs @@ -30,7 +30,6 @@ namespace WixToolset private List inspectorExtensions; private bool sectionIdOnRows; private WixActionRowCollection standardActions; - private Localizer localizer; private Output activeOutput; private TableDefinitionCollection tableDefinitions; @@ -52,11 +51,7 @@ namespace WixToolset /// Gets or sets the localizer. /// /// The localizer. - public Localizer Localizer - { - get { return this.localizer; } - set { this.localizer = value; } - } + public Localizer Localizer { get; set; } /// /// Gets or sets the path to output unreferenced symbols to. If null or empty, there is no output. @@ -202,9 +197,9 @@ namespace WixToolset // now that we know where we're starting from, create the output object output = new Output(null); output.EntrySection = find.EntrySection; // Note: this entry section will get added to the Output.Sections collection later - if (null != this.localizer && -1 != this.localizer.Codepage) + if (null != this.Localizer && -1 != this.Localizer.Codepage) { - output.Codepage = this.localizer.Codepage; + output.Codepage = this.Localizer.Codepage; } this.activeOutput = output; @@ -1707,7 +1702,7 @@ namespace WixToolset int localizedColumnCount = 0; // if there are localization strings, figure out which columns can be localized in this table - if (null != this.localizer) + if (null != this.Localizer) { for (int i = 0; i < table.Definition.Columns.Count; i++) { diff --git a/src/wix/Program.cs b/src/wix/Program.cs index 477f05ff..277f99fe 100644 --- a/src/wix/Program.cs +++ b/src/wix/Program.cs @@ -3,8 +3,6 @@ namespace WixToolset.Core { using System; - using System.Collections.Generic; - using System.IO; using WixToolset.Data; /// -- cgit v1.2.3-55-g6feb