diff --git a/WixToolset.Core.sln b/WixToolset.Core.sln index a97f38d..523c960 100644 --- a/WixToolset.Core.sln +++ b/WixToolset.Core.sln @@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.WindowsInst EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.Burn", "src\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj", "{BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.ExtensionCache", "src\WixToolset.Core.ExtensionCache\WixToolset.Core.ExtensionCache.csproj", "{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{1284331E-BC6C-426D-AAAF-140C0174F875}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Extension", "src\test\Example.Extension\Example.Extension.csproj", "{C66C2503-C671-4230-8B48-1D93A8532A28}" @@ -66,6 +68,18 @@ Global {BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x64.Build.0 = Release|Any CPU {BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x86.ActiveCfg = Release|Any CPU {BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x86.Build.0 = Release|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x64.ActiveCfg = Debug|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x64.Build.0 = Debug|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x86.ActiveCfg = Debug|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x86.Build.0 = Debug|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|Any CPU.Build.0 = Release|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x64.ActiveCfg = Release|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x64.Build.0 = Release|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x86.ActiveCfg = Release|Any CPU + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x86.Build.0 = Release|Any CPU {C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|Any CPU.Build.0 = Debug|Any CPU {C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/src/CSharp.Build.props b/src/CSharp.Build.props index bcd47a0..81d24ad 100644 --- a/src/CSharp.Build.props +++ b/src/CSharp.Build.props @@ -8,5 +8,6 @@ true true $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index dac7452..cb98893 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -9,6 +9,11 @@ See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284 --> + + false + $(OutputPath)\$(AssemblyName).xml + + true $(SolutionPath) @@ -45,4 +50,7 @@ + + + diff --git a/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs b/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs index 01c9f9c..bca1be7 100644 --- a/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs +++ b/src/WixToolset.Core.Burn/Bundles/BurnCommon.cs @@ -9,7 +9,7 @@ namespace WixToolset.Core.Burn.Bundles using WixToolset.Extensibility.Services; /// - /// Common functionality for Burn PE Writer & Reader for the WiX toolset. + /// Common functionality for Burn PE Writer & Reader for the WiX toolset. /// /// This class encapsulates common functionality related to /// bundled/chained setup packages. @@ -107,8 +107,8 @@ namespace WixToolset.Core.Burn.Bundles /// /// Creates a BurnCommon for re-writing a PE file. /// + /// /// File to modify in-place. - /// GUID for the bundle. public BurnCommon(IMessaging messaging, string fileExe) { this.messaging = messaging; diff --git a/src/WixToolset.Core.Burn/Bundles/BurnReader.cs b/src/WixToolset.Core.Burn/Bundles/BurnReader.cs index b4e2362..68fdea1 100644 --- a/src/WixToolset.Core.Burn/Bundles/BurnReader.cs +++ b/src/WixToolset.Core.Burn/Bundles/BurnReader.cs @@ -32,6 +32,7 @@ namespace WixToolset.Core.Burn.Bundles /// /// Creates a BurnReader for reading a PE file. /// + /// /// File to read. private BurnReader(IMessaging messaging, string fileExe) : base(messaging, fileExe) @@ -58,6 +59,7 @@ namespace WixToolset.Core.Burn.Bundles /// /// Opens a Burn reader. /// + /// /// Path to file. /// Burn reader. public static BurnReader Open(IMessaging messaging, string fileExe) @@ -77,6 +79,7 @@ namespace WixToolset.Core.Burn.Bundles /// Gets the UX container from the exe and extracts its contents to the output directory. /// /// Directory to write extracted files to. + /// Scratch directory. /// True if successful, false otherwise public bool ExtractUXContainer(string outputDirectory, string tempDirectory) { @@ -157,6 +160,7 @@ namespace WixToolset.Core.Burn.Bundles /// Gets the attached container from the exe and extracts its contents to the output directory. /// /// Directory to write extracted files to. + /// Scratch directory. /// True if successful, false otherwise public bool ExtractAttachedContainer(string outputDirectory, string tempDirectory) { diff --git a/src/WixToolset.Core.Burn/Bundles/BurnWriter.cs b/src/WixToolset.Core.Burn/Bundles/BurnWriter.cs index 83b73a6..be9b8ea 100644 --- a/src/WixToolset.Core.Burn/Bundles/BurnWriter.cs +++ b/src/WixToolset.Core.Burn/Bundles/BurnWriter.cs @@ -29,8 +29,8 @@ namespace WixToolset.Core.Burn.Bundles /// /// Creates a BurnWriter for re-writing a PE file. /// + /// /// File to modify in-place. - /// GUID for the bundle. private BurnWriter(IMessaging messaging, string fileExe) : base(messaging, fileExe) { @@ -39,6 +39,7 @@ namespace WixToolset.Core.Burn.Bundles /// /// Opens a Burn writer. /// + /// /// Path to file. /// Burn writer. public static BurnWriter Open(IMessaging messaging, string fileExe) @@ -197,7 +198,9 @@ namespace WixToolset.Core.Burn.Bundles /// Appends a container to the exe and updates the ".wixburn" section data to point to it. /// /// File stream to append to the current exe. + /// Size of the container. /// Offset of size field for this container in ".wixburn" section data. + /// Number of Burn sections. /// true if the container data is successfully appended; false otherwise private bool AppendContainer(Stream containerStream, UInt32 containerSize, UInt32 burnSectionOffsetSize, UInt32 burnSectionCount) { diff --git a/src/WixToolset.Core.Burn/RowIndexedList.cs b/src/WixToolset.Core.Burn/RowIndexedList.cs index 3a4dad3..73172dc 100644 --- a/src/WixToolset.Core.Burn/RowIndexedList.cs +++ b/src/WixToolset.Core.Burn/RowIndexedList.cs @@ -7,18 +7,18 @@ namespace WixToolset.Core.Burn using WixToolset.Data.WindowsInstaller; /// - /// A list of rows indexed by their primary key. Unlike a + /// A list of rows indexed by their primary key. Unlike a RowDictionary /// this indexed list will track rows in their added order and will allow rows with /// duplicate keys to be added to the list, although only the first row will be indexed. /// - public sealed class RowIndexedList : IList where T : Row + internal sealed class RowIndexedList : IList where T : Row { private Dictionary index; private List rows; private List duplicates; /// - /// Creates an empty . + /// Creates an empty . /// public RowIndexedList() { @@ -28,7 +28,7 @@ namespace WixToolset.Core.Burn } /// - /// Creates and populates a with the rows from the given enumerator. + /// Creates and populates a with the rows from the given enumerator. /// /// Rows to index. public RowIndexedList(IEnumerable rows) @@ -41,7 +41,7 @@ namespace WixToolset.Core.Burn } /// - /// Creates and populates a with the rows from the given . + /// Creates and populates a with the rows from the given . /// /// The table to index. /// diff --git a/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj b/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj index b0be1d3..8b98956 100644 --- a/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj +++ b/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj @@ -9,6 +9,7 @@ WiX Toolset Core Burn embedded true + true @@ -28,8 +29,8 @@ - - + + diff --git a/src/WixToolset.Core.Burn/WixToolsetCoreServiceProviderExtensions.cs b/src/WixToolset.Core.Burn/WixToolsetCoreServiceProviderExtensions.cs index 04fa4da..5303899 100644 --- a/src/WixToolset.Core.Burn/WixToolsetCoreServiceProviderExtensions.cs +++ b/src/WixToolset.Core.Burn/WixToolsetCoreServiceProviderExtensions.cs @@ -7,8 +7,16 @@ namespace WixToolset.Core.Burn using WixToolset.Core.Burn.ExtensibilityServices; using WixToolset.Extensibility.Services; + /// + /// Extensions methods for adding Burn services. + /// public static class WixToolsetCoreServiceProviderExtensions { + /// + /// Adds Burn Services. + /// + /// + /// public static IWixToolsetCoreServiceProvider AddBundleBackend(this IWixToolsetCoreServiceProvider coreProvider) { AddServices(coreProvider); diff --git a/src/WixToolset.Core.ExtensionCache/WixToolset.Core.ExtensionCache.csproj b/src/WixToolset.Core.ExtensionCache/WixToolset.Core.ExtensionCache.csproj index 2730582..4b9fe72 100644 --- a/src/WixToolset.Core.ExtensionCache/WixToolset.Core.ExtensionCache.csproj +++ b/src/WixToolset.Core.ExtensionCache/WixToolset.Core.ExtensionCache.csproj @@ -9,6 +9,7 @@ WiX Toolset Extension Cache embedded true + true diff --git a/src/WixToolset.Core.ExtensionCache/WixToolsetCoreServiceProviderExtensions.cs b/src/WixToolset.Core.ExtensionCache/WixToolsetCoreServiceProviderExtensions.cs index 535a08f..424fc46 100644 --- a/src/WixToolset.Core.ExtensionCache/WixToolsetCoreServiceProviderExtensions.cs +++ b/src/WixToolset.Core.ExtensionCache/WixToolsetCoreServiceProviderExtensions.cs @@ -6,8 +6,16 @@ namespace WixToolset.Core.ExtensionCache using System.Collections.Generic; using WixToolset.Extensibility.Services; + /// + /// Extensions methods for adding ExtensionCache services. + /// public static class WixToolsetCoreServiceProviderExtensions { + /// + /// Adds ExtensionCache services. + /// + /// + /// public static IWixToolsetCoreServiceProvider AddExtensionCacheManager(this IWixToolsetCoreServiceProvider coreProvider) { var extensionManager = coreProvider.GetService(); diff --git a/src/WixToolset.Core.TestPackage/BundleExtractor.cs b/src/WixToolset.Core.TestPackage/BundleExtractor.cs index 8a56f11..ad97f11 100644 --- a/src/WixToolset.Core.TestPackage/BundleExtractor.cs +++ b/src/WixToolset.Core.TestPackage/BundleExtractor.cs @@ -7,8 +7,19 @@ namespace WixToolset.Core.TestPackage using WixToolset.Core.Burn.Bundles; using WixToolset.Extensibility.Services; + /// + /// Class to extract bundle contents for testing. + /// public class BundleExtractor { + /// + /// Extracts the BA container. + /// + /// + /// Path to the bundle. + /// Path to extract to. + /// Temp path for extraction. + /// public static ExtractBAContainerResult ExtractBAContainer(IMessaging messaging, string bundleFilePath, string destinationFolderPath, string tempFolderPath) { var result = new ExtractBAContainerResult(); @@ -33,6 +44,12 @@ namespace WixToolset.Core.TestPackage return result; } + /// + /// Gets an for BootstrapperApplicationData.xml with the given prefix assigned to the root namespace. + /// + /// + /// + /// public static XmlNamespaceManager GetBADataNamespaceManager(XmlDocument document, string prefix) { var namespaceManager = new XmlNamespaceManager(document.NameTable); @@ -40,6 +57,12 @@ namespace WixToolset.Core.TestPackage return namespaceManager; } + /// + /// Gets an for BundleExtensionData.xml with the given prefix assigned to the root namespace. + /// + /// + /// + /// public static XmlNamespaceManager GetBundleExtensionDataNamespaceManager(XmlDocument document, string prefix) { var namespaceManager = new XmlNamespaceManager(document.NameTable); @@ -47,6 +70,12 @@ namespace WixToolset.Core.TestPackage return namespaceManager; } + /// + /// Gets an for the Burn manifest.xml with the given prefix assigned to the root namespace. + /// + /// + /// + /// public static XmlNamespaceManager GetBurnNamespaceManager(XmlDocument document, string prefix) { var namespaceManager = new XmlNamespaceManager(document.NameTable); @@ -54,6 +83,11 @@ namespace WixToolset.Core.TestPackage return namespaceManager; } + /// + /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container. + /// + /// + /// public static XmlDocument LoadBAData(string baFolderPath) { var document = new XmlDocument(); @@ -61,6 +95,11 @@ namespace WixToolset.Core.TestPackage return document; } + /// + /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container. + /// + /// + /// public static XmlDocument LoadBundleExtensionData(string baFolderPath) { var document = new XmlDocument(); @@ -68,6 +107,11 @@ namespace WixToolset.Core.TestPackage return document; } + /// + /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container. + /// + /// + /// public static XmlDocument LoadBurnManifest(string baFolderPath) { var document = new XmlDocument(); diff --git a/src/WixToolset.Core.TestPackage/ExtractBAContainerResult.cs b/src/WixToolset.Core.TestPackage/ExtractBAContainerResult.cs index 63d7bb3..277861f 100644 --- a/src/WixToolset.Core.TestPackage/ExtractBAContainerResult.cs +++ b/src/WixToolset.Core.TestPackage/ExtractBAContainerResult.cs @@ -6,22 +6,61 @@ namespace WixToolset.Core.TestPackage using System.Xml; using Xunit; + /// + /// The result of extracting the BA container. + /// public class ExtractBAContainerResult { + /// + /// for BundleExtensionData.xml. + /// public XmlDocument BundleExtensionDataDocument { get; set; } + + /// + /// for BundleExtensionData.xml. + /// public XmlNamespaceManager BundleExtensionDataNamespaceManager { get; set; } + + /// + /// for BootstrapperApplicationData.xml. + /// public XmlDocument BADataDocument { get; set; } + + /// + /// for BootstrapperApplicationData.xml. + /// public XmlNamespaceManager BADataNamespaceManager { get; set; } + + /// + /// for the Burn manifest.xml. + /// public XmlDocument ManifestDocument { get; set; } + + /// + /// for the Burn manifest.xml. + /// public XmlNamespaceManager ManifestNamespaceManager { get; set; } + + /// + /// Whether extraction succeeded. + /// public bool Success { get; set; } + /// + /// + /// + /// public ExtractBAContainerResult AssertSuccess() { Assert.True(this.Success); return this; } + /// + /// Returns the relative path of the BA entry point dll in the given folder. + /// + /// + /// public string GetBAFilePath(string extractedBAContainerFolderPath) { var uxPayloads = this.SelectManifestNodes("/burn:BurnManifest/burn:UX/burn:Payload"); @@ -30,6 +69,12 @@ namespace WixToolset.Core.TestPackage return Path.Combine(extractedBAContainerFolderPath, relativeBAPath); } + /// + /// Returns the relative path of the BundleExtension entry point dll in the given folder. + /// + /// + /// + /// public string GetBundleExtensionFilePath(string extractedBAContainerFolderPath, string extensionId) { var uxPayloads = this.SelectManifestNodes($"/burn:BurnManifest/burn:UX/burn:Payload[@Id='{extensionId}']"); diff --git a/src/WixToolset.Core.TestPackage/TestMessageListener.cs b/src/WixToolset.Core.TestPackage/TestMessageListener.cs index b586386..7040fe8 100644 --- a/src/WixToolset.Core.TestPackage/TestMessageListener.cs +++ b/src/WixToolset.Core.TestPackage/TestMessageListener.cs @@ -5,24 +5,51 @@ using WixToolset.Extensibility.Services; namespace WixToolset.Core.TestPackage { + /// + /// An that simply stores all the messages. + /// public sealed class TestMessageListener : IMessageListener { + /// + /// All messages that have been received. + /// public List Messages { get; } = new List(); + /// + /// + /// public string ShortAppName => "TEST"; + /// + /// + /// public string LongAppName => "Test"; + /// + /// Stores the message in . + /// + /// public void Write(Message message) { this.Messages.Add(message); } + /// + /// Stores the message in . + /// + /// public void Write(string message) { this.Messages.Add(new Message(null, MessageLevel.Information, 0, message)); } + /// + /// Always returns defaultMessageLevel. + /// + /// + /// + /// + /// public MessageLevel CalculateMessageLevel(IMessaging messaging, Message message, MessageLevel defaultMessageLevel) => defaultMessageLevel; } } diff --git a/src/WixToolset.Core.TestPackage/WixRunner.cs b/src/WixToolset.Core.TestPackage/WixRunner.cs index 940b55a..a3883cd 100644 --- a/src/WixToolset.Core.TestPackage/WixRunner.cs +++ b/src/WixToolset.Core.TestPackage/WixRunner.cs @@ -9,11 +9,19 @@ namespace WixToolset.Core.TestPackage using WixToolset.Core.Burn; using WixToolset.Core.WindowsInstaller; using WixToolset.Data; - using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; + /// + /// Utility class to emulate wix.exe with standard backends. + /// public static class WixRunner { + /// + /// Emulates calling wix.exe with standard backends. + /// + /// + /// + /// public static int Execute(string[] args, out List messages) { var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); @@ -21,6 +29,11 @@ namespace WixToolset.Core.TestPackage return task.Result; } + /// + /// Emulates calling wix.exe with standard backends. + /// + /// + /// public static WixRunnerResult Execute(params string[] args) { var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); @@ -28,6 +41,13 @@ namespace WixToolset.Core.TestPackage return new WixRunnerResult { ExitCode = exitCode.Result, Messages = messages.ToArray() }; } + /// + /// Emulates calling wix.exe with standard backends. + /// + /// + /// + /// + /// public static Task Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List messages) { coreProvider.AddWindowsInstallerBackend() diff --git a/src/WixToolset.Core.TestPackage/WixRunnerResult.cs b/src/WixToolset.Core.TestPackage/WixRunnerResult.cs index 88f2015..13e3a9e 100644 --- a/src/WixToolset.Core.TestPackage/WixRunnerResult.cs +++ b/src/WixToolset.Core.TestPackage/WixRunnerResult.cs @@ -7,12 +7,25 @@ namespace WixToolset.Core.TestPackage using WixToolset.Data; using Xunit; + /// + /// The result of an Execute method of . + /// public class WixRunnerResult { + /// + /// ExitCode for the operation. + /// public int ExitCode { get; set; } + /// + /// Messages from the operation. + /// public Message[] Messages { get; set; } + /// + /// + /// + /// public WixRunnerResult AssertSuccess() { Assert.True(0 == this.ExitCode, $"\r\n\r\nWixRunner failed with exit code: {this.ExitCode}\r\n Output: {String.Join("\r\n ", FormatMessages(this.Messages))}\r\n"); diff --git a/src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj b/src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj index 06793ff..b64b407 100644 --- a/src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj +++ b/src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj @@ -8,6 +8,7 @@ Internal WiX Toolset Test Package embedded true + true diff --git a/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs b/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs index a7f0450..f4966f7 100644 --- a/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs +++ b/src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs @@ -7,13 +7,28 @@ namespace WixToolset.Core.TestPackage using System.Text.RegularExpressions; using System.Xml; + /// + /// Utility class to help compare XML in tests using string comparisons by using single quotes and stripping all namespaces. + /// public static class XmlNodeExtensions { + /// + /// Returns the node's outer XML using single quotes and stripping all namespaces. + /// + /// + /// Attributes for which the value should be set to '*'. + /// public static string GetTestXml(this XmlNode node, Dictionary> ignoredAttributesByElementName = null) { return node.OuterXml.GetTestXml(ignoredAttributesByElementName); } + /// + /// Returns the XML using single quotes and stripping all namespaces. + /// + /// + /// Attributes for which the value should be set to '*'. + /// public static string GetTestXml(this string xml, Dictionary> ignoredAttributesByElementName = null) { string formattedXml; diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs index eccc97d..301c324 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs @@ -115,7 +115,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// /// Assign files to cabinets based on MediaTemplate authoring. /// - /// FileRowCollection private void AutoAssignFiles(List mediaTable, Dictionary> filesByCabinetMedia, List uncompressedFiles) { const int MaxCabIndex = 999; @@ -295,7 +294,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// /// Adds a symbol to the section with cab name template filled in. /// - /// + /// /// /// private MediaSymbol AddMediaSymbol(WixMediaTemplateSymbol mediaTemplateSymbol, int cabIndex) diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs index dce89f7..382e651 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs @@ -28,6 +28,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// /// Instantiate a new CabinetBuilder. /// + /// /// number of threads to use /// Address of Binder's callback function for Cabinet Splitting public CabinetBuilder(IMessaging messaging, int threadCount, IntPtr newCabNamesCallBackAddress) diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs index 189c5f0..6dbcb1a 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs @@ -13,7 +13,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; - public class CabinetResolver + internal class CabinetResolver { public CabinetResolver(IWixToolsetServiceProvider serviceProvider, string cabCachePath, IEnumerable backendExtensions) { diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetWorkItem.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetWorkItem.cs index a451229..48f0574 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CabinetWorkItem.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CabinetWorkItem.cs @@ -18,7 +18,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// The cabinet file. /// Maximum threshold for each cabinet. /// The compression level of the cabinet. - /// The binder file manager. + /// Modularization suffix used when building a Merge Module. + /// public CabinetWorkItem(IEnumerable fileFacades, string cabinetFile, int maxThreshold, CompressionLevel compressionLevel, string modularizationSuffix /*, BinderFileManager binderFileManager*/) { this.CabinetFile = cabinetFile; @@ -52,10 +53,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// The collection of files in this cabinet. public IEnumerable FileFacades { get; } - /// - /// Gets the binder file manager. - /// - /// The binder file manager. + // + // Gets the binder file manager. + // + // The binder file manager. //public BinderFileManager BinderFileManager { get; private set; } /// diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs index 5c296f7..f0acd3d 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs @@ -90,9 +90,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind public IEnumerable TrackedFiles => this.trackedFiles; - /// Output to generate image for. - /// The directory in which the image should be layed out. - /// Flag if source image should be compressed. public void Execute() { this.lastCabinetAddedToMediaTable = new Dictionary(); @@ -177,6 +174,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// Output for the current database. /// Directory to create cabinet in. /// Media symbol containing information about the cabinet. + /// Desired compression level. /// Collection of files in this cabinet. /// created CabinetWorkItem object private CabinetWorkItem CreateCabinetWorkItem(WindowsInstallerData output, string cabinetDir, MediaSymbol mediaSymbol, CompressionLevel compressionLevel, IEnumerable fileFacades) @@ -284,7 +282,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// This callback will not be called in case there is no File splitting. i.e. MaximumCabinetSizeForLargeFileSplitting was not authored /// /// The name of splitting cabinet without extention e.g. "cab1". - /// The name of the new cabinet that would be formed by splitting e.g. "cab1b.cab" + /// The name of the new cabinet that would be formed by splitting e.g. "cab1b.cab" /// The file token of the first file present in the splitting cabinet internal void NewCabNamesCallBack([MarshalAs(UnmanagedType.LPWStr)]string firstCabName, [MarshalAs(UnmanagedType.LPWStr)]string newCabinetName, [MarshalAs(UnmanagedType.LPWStr)]string fileToken) { diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs index c8fa037..d3c65b6 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs @@ -55,7 +55,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind public List GeneratedTemporaryFiles { get; } = new List(); /// - /// Whether to use a subdirectory based on the file name for intermediate files. + /// Whether to use a subdirectory based on the database file name for intermediate files. /// private bool SuppressAddingValidationRows { get; } diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs index 121ffb1..6dcb109 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs @@ -15,7 +15,7 @@ namespace WixToolset.Core.WindowsInstaller /// /// Creates a transform by diffing two outputs. /// - public sealed class GenerateTransformCommand + internal class GenerateTransformCommand { private const char sectionDelimiter = '/'; private readonly IMessaging messaging; @@ -62,10 +62,6 @@ namespace WixToolset.Core.WindowsInstaller /// /// Creates a transform by diffing two outputs. /// - /// The target output. - /// The updated output. - /// - /// The transform. public WindowsInstallerData Execute() { var targetOutput = this.TargetOutput; diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs index 944fb22..4e716a4 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs @@ -384,7 +384,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind /// /// Signal a warning if a non-keypath file was changed in a patch without also changing the keypath file of the component. /// - /// The output to validate. + /// The output to validate. private void ValidateFileRowChanges(WindowsInstallerData transform) { var componentTable = transform.Tables["Component"]; diff --git a/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs b/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs index 2288ced..29e15c9 100644 --- a/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs +++ b/src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs @@ -248,19 +248,20 @@ namespace WixToolset.Core.WindowsInstaller private XElement GetIndexedElement(string table, params string[] primaryKey) => this.IndexedElements[String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey))]; /// - /// Gets the element corresponding to the primary key of the given table. + /// Tries to get the element corresponding to the primary key of the given table. /// - /// The table corresponding to the element. - /// The primary key corresponding to the element. - /// The indexed element. + /// The table corresponding to the element. + /// The indexed element. + /// Whether the element was found. private bool TryGetIndexedElement(WixToolset.Data.WindowsInstaller.Row row, out XElement xElement) => this.TryGetIndexedElement(row.TableDefinition.Name, out xElement, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter)); /// - /// Gets the element corresponding to the primary key of the given table. + /// Tries to get the element corresponding to the primary key of the given table. /// /// The table corresponding to the element. + /// The indexed element. /// The primary key corresponding to the element. - /// The indexed element. + /// Whether the element was found. private bool TryGetIndexedElement(string table, out XElement xElement, params string[] primaryKey) => this.IndexedElements.TryGetValue(String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey)), out xElement); /// @@ -276,8 +277,9 @@ namespace WixToolset.Core.WindowsInstaller /// /// Index an element by its corresponding row. /// - /// The row corresponding to the element. /// The element to index. + /// + /// private void IndexElement(XElement element, string table, params string[] primaryKey) { this.IndexedElements.Add(String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey)), element); @@ -342,7 +344,7 @@ namespace WixToolset.Core.WindowsInstaller /// Set the common control attributes in a control element. /// /// The control attributes. - /// The control element. + /// The control element. private static void SetControlAttributes(int attributes, XElement xControl) { if (0 == (attributes & WindowsInstallerConstants.MsidbControlAttributesEnabled)) @@ -2424,6 +2426,7 @@ namespace WixToolset.Core.WindowsInstaller /// Initialize decompilation. /// /// The collection of all tables. + /// private void InitializeDecompile(TableIndexedCollection tables, int codepage) { // reset all the state information @@ -2983,7 +2986,7 @@ namespace WixToolset.Core.WindowsInstaller /// /// Decompile the _SummaryInformation table. /// - /// The table to decompile. + /// The tables to decompile. private void FinalizeSummaryInformationStream(TableIndexedCollection tables) { var table = tables["_SummaryInformation"]; diff --git a/src/WixToolset.Core.WindowsInstaller/Msi/MsiInterop.cs b/src/WixToolset.Core.WindowsInstaller/Msi/MsiInterop.cs index 8d19503..ae58561 100644 --- a/src/WixToolset.Core.WindowsInstaller/Msi/MsiInterop.cs +++ b/src/WixToolset.Core.WindowsInstaller/Msi/MsiInterop.cs @@ -177,7 +177,7 @@ namespace WixToolset.Core.WindowsInstaller.Msi /// /// Class exposing static functions and structs from MSI API. /// - public sealed class MsiInterop + internal sealed class MsiInterop { // Patching constants public const int MsiMaxStreamNameLength = 62; // http://msdn2.microsoft.com/library/aa370551.aspx diff --git a/src/WixToolset.Core.WindowsInstaller/RowDictionary.cs b/src/WixToolset.Core.WindowsInstaller/RowDictionary.cs index 101ebef..bbb97c2 100644 --- a/src/WixToolset.Core.WindowsInstaller/RowDictionary.cs +++ b/src/WixToolset.Core.WindowsInstaller/RowDictionary.cs @@ -7,13 +7,13 @@ namespace WixToolset.Core.WindowsInstaller using WixToolset.Data.WindowsInstaller; /// - /// A dictionary of rows. Unlike the this + /// A dictionary of rows. Unlike the RowIndexedList this /// will throw when multiple rows with the same key are added. /// - public sealed class RowDictionary : Dictionary where T : Row + internal sealed class RowDictionary : Dictionary where T : Row { /// - /// Creates an empty . + /// Creates an empty . /// public RowDictionary() : base(StringComparer.InvariantCulture) @@ -21,9 +21,9 @@ namespace WixToolset.Core.WindowsInstaller } /// - /// Creates and populates a with the rows from the given enumerator. + /// Creates and populates a with the rows from the given enumerator. /// - /// Rows to add. + /// Rows to add. public RowDictionary(IEnumerable rows) : this() { @@ -34,7 +34,7 @@ namespace WixToolset.Core.WindowsInstaller } /// - /// Creates and populates a with the rows from the given . + /// Creates and populates a with the rows from the given . /// /// The table to index. /// diff --git a/src/WixToolset.Core.WindowsInstaller/Unbinder.cs b/src/WixToolset.Core.WindowsInstaller/Unbinder.cs index 2ca0b55..a2f0226 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbinder.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbinder.cs @@ -11,7 +11,7 @@ namespace WixToolset.Core /// /// Unbinder core of the WiX toolset. /// - public sealed class Unbinder + internal sealed class Unbinder { public IEnumerable BackendFactories { get; } diff --git a/src/WixToolset.Core.WindowsInstaller/Validator.cs b/src/WixToolset.Core.WindowsInstaller/Validator.cs index 72b09eb..e8117de 100644 --- a/src/WixToolset.Core.WindowsInstaller/Validator.cs +++ b/src/WixToolset.Core.WindowsInstaller/Validator.cs @@ -22,7 +22,7 @@ namespace WixToolset.Core.WindowsInstaller /// /// Runs internal consistency evaluators (ICEs) from cub files against a database. /// - public sealed class Validator + internal sealed class Validator { private string actionName; private StringCollection cubeFiles; diff --git a/src/WixToolset.Core.WindowsInstaller/ValidatorExtension.cs b/src/WixToolset.Core.WindowsInstaller/ValidatorExtension.cs index 5ce0414..968ab38 100644 --- a/src/WixToolset.Core.WindowsInstaller/ValidatorExtension.cs +++ b/src/WixToolset.Core.WindowsInstaller/ValidatorExtension.cs @@ -52,7 +52,7 @@ namespace WixToolset.Extensibility /// Called at the beginning of the validation of a database file. /// /// - /// The will set + /// The Validator will set /// before calling InitializeValidator. /// Notes to Inheritors: When overriding /// InitializeValidator in a derived class, be sure to call @@ -83,7 +83,7 @@ namespace WixToolset.Extensibility } /// - /// Logs a message from the . + /// Logs a message from the Validator. /// /// A of tab-delmited tokens /// in the validation message. @@ -93,7 +93,7 @@ namespace WixToolset.Extensibility } /// - /// Logs a message from the . + /// Logs a message from the Validator. /// /// A of tab-delmited tokens /// in the validation message. diff --git a/src/WixToolset.Core.WindowsInstaller/WixToolset.Core.WindowsInstaller.csproj b/src/WixToolset.Core.WindowsInstaller/WixToolset.Core.WindowsInstaller.csproj index 9836acb..900115e 100644 --- a/src/WixToolset.Core.WindowsInstaller/WixToolset.Core.WindowsInstaller.csproj +++ b/src/WixToolset.Core.WindowsInstaller/WixToolset.Core.WindowsInstaller.csproj @@ -9,6 +9,7 @@ WiX Toolset Core Windows Installer embedded true + true @@ -17,7 +18,7 @@ - + diff --git a/src/WixToolset.Core.WindowsInstaller/WixToolsetCoreServiceProviderExtensions.cs b/src/WixToolset.Core.WindowsInstaller/WixToolsetCoreServiceProviderExtensions.cs index 15fbf67..c69f1af 100644 --- a/src/WixToolset.Core.WindowsInstaller/WixToolsetCoreServiceProviderExtensions.cs +++ b/src/WixToolset.Core.WindowsInstaller/WixToolsetCoreServiceProviderExtensions.cs @@ -7,8 +7,16 @@ namespace WixToolset.Core.WindowsInstaller using WixToolset.Core.WindowsInstaller.ExtensibilityServices; using WixToolset.Extensibility.Services; + /// + /// Extensions methods for adding WindowsInstaller services. + /// public static class WixToolsetCoreServiceProviderExtensions { + /// + /// Adds WindowsInstaller services. + /// + /// + /// public static IWixToolsetCoreServiceProvider AddWindowsInstallerBackend(this IWixToolsetCoreServiceProvider coreProvider) { AddServices(coreProvider); diff --git a/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs b/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs index bb9ab84..29fba6b 100644 --- a/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs +++ b/src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs @@ -9,6 +9,7 @@ namespace WixToolset.Core.Bind using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; +#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility public class ExtractEmbeddedFilesCommand { public ExtractEmbeddedFilesCommand(IBackendHelper backendHelper, IEnumerable embeddedFiles) diff --git a/src/WixToolset.Core/Bind/FileFacade.cs b/src/WixToolset.Core/Bind/FileFacade.cs index 075d3d3..ec4e972 100644 --- a/src/WixToolset.Core/Bind/FileFacade.cs +++ b/src/WixToolset.Core/Bind/FileFacade.cs @@ -9,6 +9,7 @@ namespace WixToolset.Core.Bind using WixToolset.Data.WindowsInstaller; using WixToolset.Data.WindowsInstaller.Rows; +#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility public class FileFacade { public FileFacade(FileSymbol file, AssemblySymbol assembly) diff --git a/src/WixToolset.Core/Bind/FileResolver.cs b/src/WixToolset.Core/Bind/FileResolver.cs index ba71c6c..eb87823 100644 --- a/src/WixToolset.Core/Bind/FileResolver.cs +++ b/src/WixToolset.Core/Bind/FileResolver.cs @@ -67,7 +67,7 @@ namespace WixToolset.Core.Bind /// Resolves the source path of a file using binder extensions. /// /// Original source value. - /// Optional type of source file being resolved. + /// Optional type of source file being resolved. /// Optional source line of source file being resolved. /// The binding stage used to determine what collection of bind paths will be used /// Optional collection of paths already checked. diff --git a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs index ebabed4..14b6d01 100644 --- a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs +++ b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs @@ -10,6 +10,7 @@ namespace WixToolset.Core.Bind using WixToolset.Extensibility.Data; using WixToolset.Extensibility.Services; +#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility /// /// Resolves the fields which had variables that needed to be resolved after the file information /// was loaded. @@ -19,6 +20,7 @@ namespace WixToolset.Core.Bind /// /// Resolve delayed fields. /// + /// /// The fields which had resolution delayed. /// The file information to use when resolving variables. public ResolveDelayedFieldsCommand(IMessaging messaging, IEnumerable delayedFields, Dictionary variableCache) diff --git a/src/WixToolset.Core/CommandLine/CommandLineParser.cs b/src/WixToolset.Core/CommandLine/CommandLineParser.cs index 2ee1e9a..1438d82 100644 --- a/src/WixToolset.Core/CommandLine/CommandLineParser.cs +++ b/src/WixToolset.Core/CommandLine/CommandLineParser.cs @@ -192,7 +192,6 @@ namespace WixToolset.Core.CommandLine /// or DirectoryInfo.GetFiles. The only way to get this directory path is manually since /// Path.GetDirectoryName does not support ".." in the path. /// - /// Throws WixFileNotFoundException if no file matching the pattern can be found. private string[] GetFiles(string searchPath, string fileType) { if (null == searchPath) diff --git a/src/WixToolset.Core/Common.cs b/src/WixToolset.Core/Common.cs index 1bb895b..79f0613 100644 --- a/src/WixToolset.Core/Common.cs +++ b/src/WixToolset.Core/Common.cs @@ -21,9 +21,21 @@ namespace WixToolset.Core public static class Common { // TODO: Find a place to put all of these so they doesn't have to be public and exposed by WixToolset.Core.dll + /// + /// + /// public const string UpgradeDetectedProperty = "WIX_UPGRADE_DETECTED"; + /// + /// + /// public const string UpgradePreventedCondition = "NOT WIX_UPGRADE_DETECTED"; + /// + /// + /// public const string DowngradeDetectedProperty = "WIX_DOWNGRADE_DETECTED"; + /// + /// + /// public const string DowngradePreventedCondition = "NOT WIX_DOWNGRADE_DETECTED"; //------------------------------------------------------------------------------------------------- @@ -51,6 +63,9 @@ namespace WixToolset.Core // GENERIC_WRITE (0x40000000L) // GENERIC_READ (0x80000000L) // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll + /// + /// + /// public static readonly string[] GenericPermissions = { "GenericAll", "GenericExecute", "GenericWrite", "GenericRead" }; // Standard Access Rights (per WinNT.h) @@ -61,6 +76,9 @@ namespace WixToolset.Core // WRITE_OWNER (0x00080000L) // SYNCHRONIZE (0x00100000L) // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll + /// + /// + /// public static readonly string[] StandardPermissions = { "Delete", "ReadPermission", "ChangePermission", "TakeOwnership", "Synchronize" }; // Object-Specific Access Rights @@ -77,11 +95,17 @@ namespace WixToolset.Core // FILE_READ_ATTRIBUTES ( 0x0080 ) // FILE_WRITE_ATTRIBUTES ( 0x0100 ) // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll + /// + /// + /// public static readonly string[] FolderPermissions = { "Read", "CreateFile", "CreateChild", "ReadExtendedAttributes", "WriteExtendedAttributes", "Traverse", "DeleteChild", "ReadAttributes", "WriteAttributes" }; // Registry Access Rights (per TODO) // ---------------------- // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll + /// + /// + /// public static readonly string[] RegistryPermissions = { "Read", "Write", "CreateSubkeys", "EnumerateSubkeys", "Notify", "CreateLink" }; // File Access Rights (per WinNT.h) @@ -99,6 +123,9 @@ namespace WixToolset.Core // STANDARD_RIGHTS_REQUIRED (0x000F0000L) // FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF) // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll + /// + /// + /// public static readonly string[] FilePermissions = { "Read", "Write", "Append", "ReadExtendedAttributes", "WriteExtendedAttributes", "Execute", "FileAllRights", "ReadAttributes", "WriteAttributes" }; internal static readonly char[] IllegalLongFilenameCharacters = new[] { '\\', '/', '?', '*', '|', '>', '<', ':', '\"' }; // illegal: \ / ? | > < : / * " @@ -596,10 +623,10 @@ namespace WixToolset.Core /// /// Get an attribute value. /// + /// /// Source line information about the owner element. /// The attribute containing the value to get. /// A rule for the contents of the value. If the contents do not follow the rule, an error is thrown. - /// A delegate that receives error messages. /// The attribute's value. internal static string GetAttributeValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute, EmptyRule emptyRule) { @@ -641,9 +668,9 @@ namespace WixToolset.Core /// /// Get an identifier attribute value and displays an error for an illegal identifier value. /// + /// /// Source line information about the owner element. /// The attribute containing the value to get. - /// A delegate that receives error messages. /// The attribute's identifier value or a special value if an error occurred. internal static string GetAttributeIdentifierValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute) { @@ -676,11 +703,11 @@ namespace WixToolset.Core /// /// Get an integer attribute value and displays an error for an illegal integer value. /// + /// /// Source line information about the owner element. /// The attribute containing the value to get. /// The minimum legal value. /// The maximum legal value. - /// A delegate that receives error messages. /// The attribute's integer value or a special value if an error occurred during conversion. public static int GetAttributeIntegerValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute, int minimum, int maximum) { @@ -715,9 +742,9 @@ namespace WixToolset.Core /// /// Gets a yes/no value and displays an error for an illegal yes/no value. /// + /// /// Source line information about the owner element. /// The attribute containing the value to get. - /// A delegate that receives error messages. /// The attribute's YesNoType value. internal static YesNoType GetAttributeYesNoValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute) { @@ -833,6 +860,7 @@ namespace WixToolset.Core /// /// Display an unexpected attribute error. /// + /// /// Source line information about the owner element. /// The attribute. public static void UnexpectedAttribute(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute) @@ -848,6 +876,7 @@ namespace WixToolset.Core /// /// Display an unsupported extension attribute error. /// + /// /// Source line information about the owner element. /// The extension attribute. internal static void UnsupportedExtensionAttribute(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute extensionAttribute) diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index addb975..62ea8aa 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs @@ -886,7 +886,7 @@ namespace WixToolset.Core /// Parses an instance element. /// /// Element to parse. - /// Identifier of instance property. + /// Identifier of instance property. private void ParseInstanceElement(XElement node, string propertyId) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); @@ -1641,6 +1641,7 @@ namespace WixToolset.Core /// Parses a product search element. /// /// Element to parse. + /// /// Signature for search element. private void ParseProductSearchElement(XElement node, string propertyId) { @@ -2570,6 +2571,8 @@ namespace WixToolset.Core /// Parses a component group element. /// /// Element to parse. + /// + /// [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] private void ParseComponentGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId) { @@ -5024,6 +5027,8 @@ namespace WixToolset.Core /// Parses a feature group element. /// /// Element to parse. + /// + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] private void ParseFeatureGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId) { @@ -5477,6 +5482,7 @@ namespace WixToolset.Core /// Default source path of parent directory. /// This will be set with the possible keyPath for the parent component. /// true if the component is 64-bit. + /// /// Yes if this element was marked as the parent component's key path, No if explicitly marked as not being a key path, or NotSet otherwise. [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] private YesNoType ParseFileElement(XElement node, string componentId, string directoryId, int diskId, string sourcePath, out string possibleKeyPath, bool win64Component, string componentGuid) @@ -6934,7 +6940,7 @@ namespace WixToolset.Core /// Parses a MajorUpgrade element. /// /// The element to parse. - /// The parent element. + /// The current context. private void ParseMajorUpgradeElement(XElement node, IDictionary contextValues) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); diff --git a/src/WixToolset.Core/CompilerCore.cs b/src/WixToolset.Core/CompilerCore.cs index 721eae6..50b88e5 100644 --- a/src/WixToolset.Core/CompilerCore.cs +++ b/src/WixToolset.Core/CompilerCore.cs @@ -127,6 +127,8 @@ namespace WixToolset.Core /// Constructor for all compiler core. /// /// The Intermediate object representing compiled source document. + /// + /// /// The WiX extensions collection. internal CompilerCore(Intermediate intermediate, IMessaging messaging, IParseHelper parseHelper, Dictionary extensions) { @@ -531,7 +533,7 @@ namespace WixToolset.Core /// /// Source line information about the owner element. /// The attribute containing the value to get. - /// Whether to allow Unicode (UCS) or UTF code pages. + /// Whether to allow Unicode (UCS) or UTF code pages. /// A valid code page integer value or variable expression. [SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes")] public string GetAttributeLocalizableCodePageValue(SourceLineNumber sourceLineNumbers, XAttribute attribute, bool onlyAnsi = false) @@ -892,7 +894,7 @@ namespace WixToolset.Core /// /// Create an identifier based on passed file name /// - /// File name to generate identifer from + /// File name to generate identifer from /// public Identifier CreateIdentifierFromFilename(string filename) { @@ -935,7 +937,7 @@ namespace WixToolset.Core /// /// Element containing element to be parsed. /// Element to be parsed. - /// Extra information about the context in which this element is being parsed. + /// Extra information about the context in which this element is being parsed. public IComponentKeyPath ParsePossibleKeyPathExtensionElement(XElement parentElement, XElement element, IDictionary context) { return this.parseHelper.ParsePossibleKeyPathExtensionElement(this.extensions.Values, this.intermediate, this.ActiveSection, parentElement, element, context); @@ -1017,6 +1019,7 @@ namespace WixToolset.Core /// Unique identifier for the section. /// Type of section to create. /// Codepage for the resulting database for this ection. + /// /// New section. internal IntermediateSection CreateActiveSection(string id, SectionType type, int codepage, string compilationId) { @@ -1034,6 +1037,7 @@ namespace WixToolset.Core /// Unique identifier for the section. /// Type of section to create. /// Codepage for the resulting database for this ection. + /// /// New section. internal IntermediateSection CreateSection(string id, SectionType type, int codepage, string compilationId) { diff --git a/src/WixToolset.Core/Compiler_2.cs b/src/WixToolset.Core/Compiler_2.cs index 1922a70..6fd1b3c 100644 --- a/src/WixToolset.Core/Compiler_2.cs +++ b/src/WixToolset.Core/Compiler_2.cs @@ -770,8 +770,10 @@ namespace WixToolset.Core /// Parses a package element. /// /// Element to parse. - /// Default package author. - /// The module guid - this is necessary until Module/@Guid is removed. + /// + /// + /// + /// private void ParseSummaryInformationElement(XElement node, ref bool isCodepageSet, ref bool isPackageNameSet, ref bool isKeywordsSet, ref bool isPackageAuthorSet) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); @@ -3433,6 +3435,7 @@ namespace WixToolset.Core /// /// Element to parse. /// Identifier of parent component. + /// private void ParseServiceInstallElement(XElement node, string componentId, bool win64Component) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); @@ -4266,6 +4269,7 @@ namespace WixToolset.Core /// Parses a shortcut property element. /// /// Element to parse. + /// private void ParseShortcutPropertyElement(XElement node, string shortcutId) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); diff --git a/src/WixToolset.Core/Compiler_Bundle.cs b/src/WixToolset.Core/Compiler_Bundle.cs index 00f88c1..0817aef 100644 --- a/src/WixToolset.Core/Compiler_Bundle.cs +++ b/src/WixToolset.Core/Compiler_Bundle.cs @@ -436,6 +436,7 @@ namespace WixToolset.Core /// Parse a Container element. /// /// Element to parse + /// private string ParseLogElement(XElement node, string fileSystemSafeBundleName) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); @@ -706,6 +707,8 @@ namespace WixToolset.Core /// Parse the BoostrapperApplication element. /// /// Element to parse + /// + /// private Identifier ParseBootstrapperApplicationDllElement(XElement node, ComplexReferenceChildType previousType, Identifier previousId) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); @@ -1308,6 +1311,8 @@ namespace WixToolset.Core /// Element to parse /// ComplexReferenceParentType of parent element. (BA or PayloadGroup) /// Identifier of parent element. + /// + /// private Identifier ParsePayloadElement(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId) { Debug.Assert(ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType); @@ -1345,6 +1350,10 @@ namespace WixToolset.Core /// Element to parse /// ComplexReferenceParentType of parent element. /// Identifier of parent element. + /// + /// + /// + /// /// Whether SourceFile was specified. private bool ParsePayloadElementContent(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, bool required, out Identifier id) { @@ -1519,9 +1528,21 @@ namespace WixToolset.Core /// /// Creates the row for a Payload. /// - /// Element to parse + /// + /// + /// + /// + /// /// ComplexReferenceParentType of parent element /// Identifier of parent element. + /// + /// + /// + /// + /// + /// + /// + /// private WixBundlePayloadSymbol CreatePayloadRow(SourceLineNumber sourceLineNumbers, Identifier id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, YesNoDefaultType compressed, YesNoType enableSignatureVerification, string displayName, string description, RemotePayload remotePayload) @@ -1640,6 +1661,8 @@ namespace WixToolset.Core /// Element to parse. /// ComplexReferenceParentType of parent element (BA or PayloadGroup). /// Identifier of parent element. + /// + /// private Identifier ParsePayloadGroupRefElement(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId) { Debug.Assert(ComplexReferenceParentType.Layout == parentType || ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType); @@ -2513,6 +2536,7 @@ namespace WixToolset.Core /// Parse CommandLine element. /// /// Element to parse + /// Parent packageId private void ParseCommandLineElement(XElement node, string packageId) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); @@ -2661,7 +2685,7 @@ namespace WixToolset.Core /// Element to parse. /// ComplexReferenceParentType of parent element (Unknown or PackageGroup). /// Identifier of parent element. - /// Identifier for package group element. + /// Identifier for package group element. private string ParsePackageGroupRefElement(XElement node, ComplexReferenceParentType parentType, string parentId) { return this.ParsePackageGroupRefElement(node, parentType, parentId, ComplexReferenceChildType.Unknown, null); @@ -2673,9 +2697,9 @@ namespace WixToolset.Core /// Element to parse. /// ComplexReferenceParentType of parent element (Unknown or PackageGroup). /// Identifier of parent element. - /// ComplexReferenceParentType of previous element (Unknown, Package, or PackageGroup). - /// Identifier of parent element. - /// Identifier for package group element. + /// + /// + /// Identifier for package group element. private string ParsePackageGroupRefElement(XElement node, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId) { Debug.Assert(ComplexReferenceParentType.Unknown == parentType || ComplexReferenceParentType.PackageGroup == parentType || ComplexReferenceParentType.Container == parentType); @@ -2740,6 +2764,7 @@ namespace WixToolset.Core /// Source line numbers. /// Identifier for the rollback boundary. /// Indicates whether the rollback boundary is vital or not. + /// Indicates whether the rollback boundary will use an MSI transaction. /// Type of parent group. /// Identifier of parent group. /// Type of previous item, if any. diff --git a/src/WixToolset.Core/Compiler_EmbeddedUI.cs b/src/WixToolset.Core/Compiler_EmbeddedUI.cs index d71bb09..ca65896 100644 --- a/src/WixToolset.Core/Compiler_EmbeddedUI.cs +++ b/src/WixToolset.Core/Compiler_EmbeddedUI.cs @@ -335,7 +335,6 @@ namespace WixToolset.Core /// Parses a embedded UI resource element. /// /// Element to parse. - /// Identifier of parent EmbeddedUI element. private void ParseEmbeddedUIResourceElement(XElement node) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); diff --git a/src/WixToolset.Core/Compiler_Patch.cs b/src/WixToolset.Core/Compiler_Patch.cs index 73e7f52..eb99d5c 100644 --- a/src/WixToolset.Core/Compiler_Patch.cs +++ b/src/WixToolset.Core/Compiler_Patch.cs @@ -319,6 +319,8 @@ namespace WixToolset.Core /// Parses a PatchFamily element. /// /// The element to parse. + /// + /// private void ParsePatchFamilyElement(XElement node, ComplexReferenceParentType parentType, string parentId) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); @@ -444,6 +446,8 @@ namespace WixToolset.Core /// Parses a PatchFamilyGroup element. /// /// Element to parse. + /// + /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")] private void ParsePatchFamilyGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId) { diff --git a/src/WixToolset.Core/Compiler_UI.cs b/src/WixToolset.Core/Compiler_UI.cs index cb1d34a..5cc9b5a 100644 --- a/src/WixToolset.Core/Compiler_UI.cs +++ b/src/WixToolset.Core/Compiler_UI.cs @@ -1049,12 +1049,11 @@ namespace WixToolset.Core /// /// Element to parse. /// Identifier for parent dialog. - /// Table control belongs in. + /// Table control belongs in. /// Last control in the tab order. /// Name of the first control in the tab order. /// Name of the default control. /// Name of the candle control. - /// True if the containing dialog tracks disk space. private void ParseControlElement(XElement node, string dialog, SymbolDefinitionType symbolType, ref ControlSymbol lastTabSymbol, ref string firstControl, ref string defaultControl, ref string cancelControl) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); diff --git a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs index de5595e..6a71c4e 100644 --- a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs @@ -149,12 +149,6 @@ namespace WixToolset.Core.ExtensibilityServices return suffix == null ? null : name + suffix; } - [Obsolete] - public Identifier CreateRegistryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash) - { - return this.CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, escapeLeadingHash); - } - public Identifier CreateRegistrySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash) { if (RegistryRootType.Unknown == root) @@ -220,12 +214,6 @@ namespace WixToolset.Core.ExtensibilityServices this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKeys); } - [Obsolete] - public void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId) - { - this.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId); - } - public void CreateWixGroupSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId) { if (null == parentId || ComplexReferenceParentType.Unknown == parentType) @@ -284,18 +272,6 @@ namespace WixToolset.Core.ExtensibilityServices }); } - [Obsolete] - public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null) - { - return this.CreateSymbol(section, sourceLineNumbers, tableName, identifier); - } - - [Obsolete] - public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null) - { - return this.CreateSymbol(section, sourceLineNumbers, symbolType, identifier); - } - public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, Identifier identifier = null) { if (this.Creator == null) @@ -311,14 +287,6 @@ namespace WixToolset.Core.ExtensibilityServices return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier); } - [Obsolete] - public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null) - { - var symbolDefinition = SymbolDefinitions.ByType(symbolType); - - return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier); - } - public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, Identifier identifier = null) { return section.AddSymbol(symbolDefinition.CreateSymbol(sourceLineNumbers, identifier)); diff --git a/src/WixToolset.Core/ExtensibilityServices/Uuid.cs b/src/WixToolset.Core/ExtensibilityServices/Uuid.cs index a5692b7..ad9eea2 100644 --- a/src/WixToolset.Core/ExtensibilityServices/Uuid.cs +++ b/src/WixToolset.Core/ExtensibilityServices/Uuid.cs @@ -17,7 +17,6 @@ namespace WixToolset.Core.ExtensibilityServices /// /// The namespace UUID. /// The value. - /// Flag to say to use MD5 instead of better SHA1. /// The UUID for the given namespace and value. public static Guid NewUuid(Guid namespaceGuid, string value) { diff --git a/src/WixToolset.Core/IBinder.cs b/src/WixToolset.Core/IBinder.cs index c2ebc2a..ec7ca4f 100644 --- a/src/WixToolset.Core/IBinder.cs +++ b/src/WixToolset.Core/IBinder.cs @@ -4,7 +4,7 @@ namespace WixToolset.Core { using WixToolset.Extensibility.Data; - public interface IBinder + internal interface IBinder { IBindResult Bind(IBindContext context); } diff --git a/src/WixToolset.Core/ICompiler.cs b/src/WixToolset.Core/ICompiler.cs index a2c4a6e..34a9a94 100644 --- a/src/WixToolset.Core/ICompiler.cs +++ b/src/WixToolset.Core/ICompiler.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core { using WixToolset.Data; using WixToolset.Extensibility.Data; - public interface ICompiler + internal interface ICompiler { Intermediate Compile(ICompileContext context); } diff --git a/src/WixToolset.Core/IDecompiler.cs b/src/WixToolset.Core/IDecompiler.cs index 05b04be..fdb8c2d 100644 --- a/src/WixToolset.Core/IDecompiler.cs +++ b/src/WixToolset.Core/IDecompiler.cs @@ -4,7 +4,7 @@ namespace WixToolset.Core { using WixToolset.Extensibility.Data; - public interface IDecompiler + internal interface IDecompiler { IDecompileResult Decompile(IDecompileContext context); } diff --git a/src/WixToolset.Core/ILayoutCreator.cs b/src/WixToolset.Core/ILayoutCreator.cs index f58d0aa..6b65e60 100644 --- a/src/WixToolset.Core/ILayoutCreator.cs +++ b/src/WixToolset.Core/ILayoutCreator.cs @@ -1,10 +1,10 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core { using WixToolset.Extensibility.Data; - public interface ILayoutCreator + internal interface ILayoutCreator { void Layout(ILayoutContext context); } diff --git a/src/WixToolset.Core/ILibrarian.cs b/src/WixToolset.Core/ILibrarian.cs index 3e951e6..fa1dd81 100644 --- a/src/WixToolset.Core/ILibrarian.cs +++ b/src/WixToolset.Core/ILibrarian.cs @@ -1,11 +1,11 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core { using WixToolset.Data; using WixToolset.Extensibility.Data; - public interface ILibrarian + internal interface ILibrarian { Intermediate Combine(ILibraryContext context); } diff --git a/src/WixToolset.Core/ILinker.cs b/src/WixToolset.Core/ILinker.cs index 0580bf4..6a7fe0f 100644 --- a/src/WixToolset.Core/ILinker.cs +++ b/src/WixToolset.Core/ILinker.cs @@ -1,10 +1,11 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core { using WixToolset.Data; using WixToolset.Extensibility.Data; +#pragma warning disable 1591 // TODO: add documentation, move into Extensibility public interface ILinker { Intermediate Link(ILinkContext context); diff --git a/src/WixToolset.Core/IPreprocessor.cs b/src/WixToolset.Core/IPreprocessor.cs index 151f811..f6ed5fe 100644 --- a/src/WixToolset.Core/IPreprocessor.cs +++ b/src/WixToolset.Core/IPreprocessor.cs @@ -5,6 +5,7 @@ namespace WixToolset.Core using System.Xml; using WixToolset.Extensibility.Data; +#pragma warning disable 1591 // TODO: add documentation, move into Extensibility public interface IPreprocessor { IPreprocessResult Preprocess(IPreprocessContext context); diff --git a/src/WixToolset.Core/IResolver.cs b/src/WixToolset.Core/IResolver.cs index c5b2568..661972c 100644 --- a/src/WixToolset.Core/IResolver.cs +++ b/src/WixToolset.Core/IResolver.cs @@ -4,7 +4,7 @@ namespace WixToolset.Core { using WixToolset.Extensibility.Data; - public interface IResolver + internal interface IResolver { IResolveResult Resolve(IResolveContext context); } diff --git a/src/WixToolset.Core/Inscriber.cs b/src/WixToolset.Core/Inscriber.cs index 649e166..cff2dab 100644 --- a/src/WixToolset.Core/Inscriber.cs +++ b/src/WixToolset.Core/Inscriber.cs @@ -10,10 +10,10 @@ namespace WixToolset.Core /// internal class Inscriber { - /// - /// Gets or sets the temp files collection. - /// - /// The temp files collection. + // + // Gets or sets the temp files collection. + // + // The temp files collection. // public TempFileCollection TempFiles // { // get { return this.tempFiles; } diff --git a/src/WixToolset.Core/LayoutCreator.cs b/src/WixToolset.Core/LayoutCreator.cs index 16fdd70..0da18ab 100644 --- a/src/WixToolset.Core/LayoutCreator.cs +++ b/src/WixToolset.Core/LayoutCreator.cs @@ -85,7 +85,7 @@ namespace WixToolset.Core /// Writes the paths to the content files to a text file. /// /// Path to write file. - /// Collection of paths to content files that will be written to file. + /// Collection of paths to content files that will be written to file. private void CreateContentsFile(string path, IEnumerable trackedFiles) { var uniqueInputFilePaths = new SortedSet(trackedFiles.Where(t => t.Type == TrackedFileType.Input).Select(t => t.Path), StringComparer.OrdinalIgnoreCase); @@ -111,7 +111,7 @@ namespace WixToolset.Core /// Writes the paths to the output files to a text file. /// /// Path to write file. - /// Collection of files that were transferred to the output directory. + /// Collection of files that were transferred to the output directory. private void CreateOutputsFile(string path, IEnumerable trackedFiles) { var uniqueOutputPaths = new SortedSet(trackedFiles.Where(t => t.Clean).Select(t => t.Path), StringComparer.OrdinalIgnoreCase); @@ -142,7 +142,7 @@ namespace WixToolset.Core /// Writes the paths to the built output files to a text file. /// /// Path to write file. - /// Collection of files that were transferred to the output directory. + /// Collection of files that were transferred to the output directory. private void CreateBuiltOutputsFile(string path, IEnumerable trackedFiles) { var uniqueBuiltPaths = new SortedSet(trackedFiles.Where(t => t.Type == TrackedFileType.Final).Select(t => t.Path), StringComparer.OrdinalIgnoreCase); diff --git a/src/WixToolset.Core/Link/SymbolWithSection.cs b/src/WixToolset.Core/Link/SymbolWithSection.cs index c8934d0..08e0107 100644 --- a/src/WixToolset.Core/Link/SymbolWithSection.cs +++ b/src/WixToolset.Core/Link/SymbolWithSection.cs @@ -18,6 +18,7 @@ namespace WixToolset.Core.Link /// /// Creates a symbol for a symbol. /// + /// /// Symbol for the symbol public SymbolWithSection(IntermediateSection section, IntermediateSymbol symbol) { diff --git a/src/WixToolset.Core/Link/WixComplexReferenceSymbolExtensions.cs b/src/WixToolset.Core/Link/WixComplexReferenceSymbolExtensions.cs index 1702d3c..2b1925a 100644 --- a/src/WixToolset.Core/Link/WixComplexReferenceSymbolExtensions.cs +++ b/src/WixToolset.Core/Link/WixComplexReferenceSymbolExtensions.cs @@ -1,4 +1,4 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core.Link { @@ -27,7 +27,8 @@ namespace WixToolset.Core.Link /// /// Compares two complex references without considering the primary bit. /// - /// Complex reference to compare to. + /// this + /// Complex reference to compare to. /// Zero if the objects are equivalent, negative number if the provided object is less, positive if greater. public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol other) { @@ -57,6 +58,7 @@ namespace WixToolset.Core.Link /// /// Changes all of the parent references to point to the passed in parent reference. /// + /// this /// New parent complex reference. public static void Reparent(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol parent) { diff --git a/src/WixToolset.Core/Link/WixGroupingOrdering.cs b/src/WixToolset.Core/Link/WixGroupingOrdering.cs index a701306..a8044a0 100644 --- a/src/WixToolset.Core/Link/WixGroupingOrdering.cs +++ b/src/WixToolset.Core/Link/WixGroupingOrdering.cs @@ -29,10 +29,8 @@ namespace WixToolset.Core.Link /// /// Creates a WixGroupingOrdering object. /// - /// Output from which to read the group and order information. + /// Output from which to read the group and order information. /// Handler for any error messages. - /// Group types to include. - /// Item types to include. public WixGroupingOrdering(IntermediateSection entrySections, IMessaging messageHandler) { this.EntrySection = entrySections; @@ -582,7 +580,7 @@ namespace WixToolset.Core.Link /// /// Adds an item to the 'after' ordering collection. /// - /// Items to add. + /// Item to add. /// Message handler in case a circular ordering reference is found. public void AddAfter(Item after, IMessaging messageHandler) { diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index 86eb7a3..e9f9554 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs @@ -1219,7 +1219,7 @@ namespace WixToolset.Core /// /// Flattens the tables used in a Bundle. /// - /// Output containing the tables to process. + /// Output containing the tables to process. private void FlattenBundleTables(IntermediateSection entrySection) { if (SectionType.Bundle != entrySection.Type) diff --git a/src/WixToolset.Core/LocalizationParser.cs b/src/WixToolset.Core/LocalizationParser.cs index 3b66b70..a0cf38a 100644 --- a/src/WixToolset.Core/LocalizationParser.cs +++ b/src/WixToolset.Core/LocalizationParser.cs @@ -63,6 +63,7 @@ namespace WixToolset.Core /// /// Adds a WixVariableRow to a dictionary while performing the expected override checks. /// + /// /// Dictionary of variable rows. /// Row to add to the variables dictionary. private static void AddWixVariable(IMessaging messaging, IDictionary variables, BindVariable wixVariableRow) @@ -80,6 +81,7 @@ namespace WixToolset.Core /// /// Parses the WixLocalization element. /// + /// /// Element to parse. private static Localization ParseWixLocalizationElement(IMessaging messaging, XElement node) { @@ -147,7 +149,9 @@ namespace WixToolset.Core /// /// Parse a localization string into a WixVariableRow. /// + /// /// Element to parse. + /// private static void ParseString(IMessaging messaging, XElement node, IDictionary variables) { string id = null; @@ -208,6 +212,7 @@ namespace WixToolset.Core /// /// Parse a localized control. /// + /// /// Element to parse. /// Dictionary of localized controls. private static void ParseUI(IMessaging messaging, XElement node, IDictionary localizedControls) diff --git a/src/WixToolset.Core/PatchSymbolFlagsType.cs b/src/WixToolset.Core/PatchSymbolFlagsType.cs index eeb5c79..e751fd1 100644 --- a/src/WixToolset.Core/PatchSymbolFlagsType.cs +++ b/src/WixToolset.Core/PatchSymbolFlagsType.cs @@ -1,19 +1,34 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. namespace WixToolset.Core { using System; - // - // The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags: - // + /// + /// The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags: + /// [Flags] public enum PatchSymbolFlagsType : uint { - PATCH_SYMBOL_NO_IMAGEHLP = 0x00000001, // don't use imagehlp.dll - PATCH_SYMBOL_NO_FAILURES = 0x00000002, // don't fail patch due to imagehlp failures - PATCH_SYMBOL_UNDECORATED_TOO = 0x00000004, // after matching decorated symbols, try to match remaining by undecorated names - PATCH_SYMBOL_RESERVED1 = 0x80000000, // (used internally) + /// + /// don't use imagehlp.dll + /// + PATCH_SYMBOL_NO_IMAGEHLP = 0x00000001, + /// + /// don't fail patch due to imagehlp failures + /// + PATCH_SYMBOL_NO_FAILURES = 0x00000002, + /// + /// after matching decorated symbols, try to match remaining by undecorated names + /// + PATCH_SYMBOL_UNDECORATED_TOO = 0x00000004, + /// + /// (used internally) + /// + PATCH_SYMBOL_RESERVED1 = 0x80000000, + /// + /// + /// MaxValue = PATCH_SYMBOL_NO_IMAGEHLP | PATCH_SYMBOL_NO_FAILURES | PATCH_SYMBOL_UNDECORATED_TOO } } diff --git a/src/WixToolset.Core/Preprocess/IfDefEventHandler.cs b/src/WixToolset.Core/Preprocess/IfDefEventHandler.cs index ff181d6..6b56638 100644 --- a/src/WixToolset.Core/Preprocess/IfDefEventHandler.cs +++ b/src/WixToolset.Core/Preprocess/IfDefEventHandler.cs @@ -5,9 +5,9 @@ namespace WixToolset.Core.Preprocess using System; using WixToolset.Data; - public delegate void IfDefEventHandler(object sender, IfDefEventArgs e); + internal delegate void IfDefEventHandler(object sender, IfDefEventArgs e); - public class IfDefEventArgs : EventArgs + internal class IfDefEventArgs : EventArgs { public IfDefEventArgs(SourceLineNumber sourceLineNumbers, bool isIfDef, bool isDefined, string variableName) { diff --git a/src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs b/src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs index beba216..3c8ff2e 100644 --- a/src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs +++ b/src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs @@ -9,13 +9,13 @@ namespace WixToolset.Core.Preprocess /// Included file event handler delegate. /// /// Sender of the message. - /// Arguments for the included file event. - public delegate void IncludedFileEventHandler(object sender, IncludedFileEventArgs e); + /// Arguments for the included file event. + internal delegate void IncludedFileEventHandler(object sender, IncludedFileEventArgs e); /// /// Event args for included file event. /// - public class IncludedFileEventArgs : EventArgs + internal class IncludedFileEventArgs : EventArgs { /// /// Creates a new IncludedFileEventArgs. diff --git a/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs b/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs index b2a4ddb..672b4b9 100644 --- a/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs +++ b/src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs @@ -9,13 +9,13 @@ namespace WixToolset.Core.Preprocess /// Preprocessed output stream event handler delegate. /// /// Sender of the message. - /// Arguments for the preprocessed stream event. - public delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e); + /// Arguments for the preprocessed stream event. + internal delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e); /// /// Event args for preprocessed stream event. /// - public class ProcessedStreamEventArgs : EventArgs + internal class ProcessedStreamEventArgs : EventArgs { /// /// Creates a new ProcessedStreamEventArgs. diff --git a/src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs b/src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs index df3a7e6..6d159ad 100644 --- a/src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs +++ b/src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs @@ -5,9 +5,9 @@ namespace WixToolset.Core.Preprocess using System; using WixToolset.Data; - public delegate void ResolvedVariableEventHandler(object sender, ResolvedVariableEventArgs e); + internal delegate void ResolvedVariableEventHandler(object sender, ResolvedVariableEventArgs e); - public class ResolvedVariableEventArgs : EventArgs + internal class ResolvedVariableEventArgs : EventArgs { public ResolvedVariableEventArgs(SourceLineNumber sourceLineNumbers, string variableName, string variableValue) { diff --git a/src/WixToolset.Core/PreprocessResult.cs b/src/WixToolset.Core/PreprocessResult.cs index 8595d21..7126f04 100644 --- a/src/WixToolset.Core/PreprocessResult.cs +++ b/src/WixToolset.Core/PreprocessResult.cs @@ -6,7 +6,7 @@ namespace WixToolset.Core using System.Xml.Linq; using WixToolset.Extensibility.Data; - public class PreprocessResult : IPreprocessResult + internal class PreprocessResult : IPreprocessResult { public XDocument Document { get; set; } diff --git a/src/WixToolset.Core/Preprocessor.cs b/src/WixToolset.Core/Preprocessor.cs index c6cd380..b111b29 100644 --- a/src/WixToolset.Core/Preprocessor.cs +++ b/src/WixToolset.Core/Preprocessor.cs @@ -63,10 +63,10 @@ namespace WixToolset.Core /// public event ProcessedStreamEventHandler ProcessedStream; - /// - /// Event for resolved variables. - /// - /// TOOD: Remove? + // + // Event for resolved variables. + // + // TOOD: Remove? //public event ResolvedVariableEventHandler ResolvedVariable; /// @@ -134,7 +134,7 @@ namespace WixToolset.Core /// /// Preprocesses a file. /// - /// The preprocessing context. + /// The preprocessing context. /// XmlReader to processing the context. /// XDocument with the postprocessed data. private IPreprocessResult Process(ProcessingState state, XmlReader reader) @@ -266,6 +266,7 @@ namespace WixToolset.Core /// /// Processes an xml reader into an xml writer. /// + /// /// Specifies if reader is from an included file. /// Reader for the source document. /// Node where content should be added. @@ -546,6 +547,7 @@ namespace WixToolset.Core /// /// Processes an error processing instruction. /// + /// /// Text from source. private void PreprocessError(ProcessingState state, string errorMessage) { @@ -558,6 +560,7 @@ namespace WixToolset.Core /// /// Processes a warning processing instruction. /// + /// /// Text from source. private void PreprocessWarning(ProcessingState state, string warningMessage) { @@ -570,6 +573,7 @@ namespace WixToolset.Core /// /// Processes a define processing instruction and creates the appropriate parameter. /// + /// /// Text from source. private void PreprocessDefine(ProcessingState state, string originalDefine) { @@ -607,6 +611,7 @@ namespace WixToolset.Core /// /// Processes an undef processing instruction and creates the appropriate parameter. /// + /// /// Text from source. private void PreprocessUndef(ProcessingState state, string originalDefine) { @@ -625,6 +630,7 @@ namespace WixToolset.Core /// /// Processes an included file. /// + /// /// Path to included file. /// Parent container for included content. private void PreprocessInclude(ProcessingState state, string includePath, XContainer parent) @@ -671,6 +677,7 @@ namespace WixToolset.Core /// /// Preprocess a foreach processing instruction. /// + /// /// The xml reader. /// The container where to output processed data. /// Offset for the line numbers. @@ -785,7 +792,9 @@ namespace WixToolset.Core /// /// Processes a pragma processing instruction /// + /// /// Text from source. + /// private void PreprocessPragma(ProcessingState state, string pragmaText, XContainer parent) { var match = PragmaRegex.Match(pragmaText); @@ -811,6 +820,7 @@ namespace WixToolset.Core /// /// Gets the next token in an expression. /// + /// /// Expression to parse. /// Expression with token removed. /// Flag if token is a string literal instead of a variable. @@ -958,6 +968,7 @@ namespace WixToolset.Core /// /// Gets the value for a variable. /// + /// /// Original expression for error message. /// Variable to evaluate. /// Value of variable. @@ -996,6 +1007,7 @@ namespace WixToolset.Core /// /// Gets the left side value, operator, and right side value of an expression. /// + /// /// Original expression to evaluate. /// Expression modified while processing. /// Left side value from expression. @@ -1048,6 +1060,7 @@ namespace WixToolset.Core /// /// Evaluates an expression. /// + /// /// Original expression to evaluate. /// Expression modified while processing. /// true if expression evaluates to true. @@ -1143,6 +1156,7 @@ namespace WixToolset.Core /// /// Gets a sub-expression in parenthesis. /// + /// /// Original expression to evaluate. /// Expression modified while processing. /// Index of end of sub-expression. @@ -1197,6 +1211,7 @@ namespace WixToolset.Core /// /// Updates expression based on operation. /// + /// /// State to update. /// Operation to apply to current value. /// Previous result. @@ -1221,6 +1236,7 @@ namespace WixToolset.Core /// /// Evaluate an expression. /// + /// /// Expression to evaluate. /// Boolean result of expression. private bool EvaluateExpression(ProcessingState state, string expression) @@ -1252,6 +1268,7 @@ namespace WixToolset.Core /// $(var.A) and $(var.B)>2 or $(var.B) <= 2 /// $(var.A) != "2" /// + /// /// The original expression /// The expression currently being evaluated /// The operation to apply to this result @@ -1322,6 +1339,7 @@ namespace WixToolset.Core /// /// Update the current line number with the reader's current state. /// + /// /// The xml reader for the preprocessor. /// This is the artificial offset of the line numbers from the reader. Used for the foreach processing. private void UpdateCurrentLineNumber(ProcessingState state, XmlReader reader, int offset) @@ -1341,6 +1359,7 @@ namespace WixToolset.Core /// /// Pushes a file name on the stack of included files. /// + /// /// Name to push on to the stack of included files. private void PushInclude(ProcessingState state, string fileName) { @@ -1374,6 +1393,7 @@ namespace WixToolset.Core /// through the search paths in the order given on the command line /// (leftmost first, ...). /// + /// /// User-specified path to the included file (usually just the file name). /// Returns a FileInfo for the found include file, or null if the file cannot be found. private string GetIncludeFile(ProcessingState state, string includePath) diff --git a/src/WixToolset.Core/ResolveFileResult.cs b/src/WixToolset.Core/ResolveFileResult.cs index e36c474..12b31d5 100644 --- a/src/WixToolset.Core/ResolveFileResult.cs +++ b/src/WixToolset.Core/ResolveFileResult.cs @@ -5,7 +5,7 @@ namespace WixToolset.Core using System.Collections.Generic; using WixToolset.Extensibility.Data; - public class ResolveFileResult : IResolveFileResult + internal class ResolveFileResult : IResolveFileResult { public string Path { get; set; } diff --git a/src/WixToolset.Core/WixToolset.Core.csproj b/src/WixToolset.Core/WixToolset.Core.csproj index 3952f97..947c445 100644 --- a/src/WixToolset.Core/WixToolset.Core.csproj +++ b/src/WixToolset.Core/WixToolset.Core.csproj @@ -9,6 +9,8 @@ WiX Toolset Core embedded true + true + true diff --git a/src/WixToolset.Core/WixToolsetServiceProviderFactory.cs b/src/WixToolset.Core/WixToolsetServiceProviderFactory.cs index 51e7a44..8e07070 100644 --- a/src/WixToolset.Core/WixToolsetServiceProviderFactory.cs +++ b/src/WixToolset.Core/WixToolsetServiceProviderFactory.cs @@ -4,8 +4,15 @@ namespace WixToolset.Core { using WixToolset.Extensibility.Services; + /// + /// Class for creating . + /// public static class WixToolsetServiceProviderFactory { + /// + /// Creates a new . + /// + /// The created public static IWixToolsetCoreServiceProvider CreateServiceProvider() { return new WixToolsetServiceProvider(); diff --git a/src/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs b/src/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs index 4568f93..4a9344b 100644 --- a/src/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs @@ -6,7 +6,6 @@ namespace WixToolsetTest.CoreIntegration using System.IO; using System.Linq; using WixBuildTools.TestSupport; - using WixToolset.Core.Burn.Bundles; using WixToolset.Core.TestPackage; using WixToolset.Data; using WixToolset.Data.Symbols; @@ -109,8 +108,10 @@ namespace WixToolsetTest.CoreIntegration Assert.InRange(result.ExitCode, 2, int.MaxValue); - Assert.Equal(1, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.IllegalRelativeLongFilename).Count()); - Assert.Equal(2, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.PayloadMustBeRelativeToCache).Count()); + var expectedIllegalRelativeLongFileName = 1; + var expectedPayloadMustBeRelativeToCache = 2; + Assert.Equal(expectedIllegalRelativeLongFileName, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.IllegalRelativeLongFilename).Count()); + Assert.Equal(expectedPayloadMustBeRelativeToCache, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.PayloadMustBeRelativeToCache).Count()); } } } diff --git a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index 9ebf1e5..b6ab1e0 100644 --- a/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj @@ -8,10 +8,6 @@ embedded - - NU1701 - -