@joebigelow / wix-1 / commits / 0e71bdd6

Enable XML doc.

Sean Hall committed Dec 18, 2020 at 22:04 UTC 0e71bdd637a6b3c34f18d4b3630d55fa4cdfd2a3
76 files changed +471 -162
WixToolset.Core.sln
+14
@@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.WindowsInst
8 EndProject
9 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.Burn", "src\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj", "{BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}"
10 EndProject
11 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.ExtensionCache", "src\WixToolset.Core.ExtensionCache\WixToolset.Core.ExtensionCache.csproj", "{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}"
12 +EndProject
13 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{1284331E-BC6C-426D-AAAF-140C0174F875}"
14 EndProject
15 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
68 {BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x64.Build.0 = Release|Any CPU
69 {BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x86.ActiveCfg = Release|Any CPU
70 {BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x86.Build.0 = Release|Any CPU
71 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
72 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|Any CPU.Build.0 = Debug|Any CPU
73 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x64.ActiveCfg = Debug|Any CPU
74 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x64.Build.0 = Debug|Any CPU
75 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x86.ActiveCfg = Debug|Any CPU
76 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x86.Build.0 = Debug|Any CPU
77 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|Any CPU.ActiveCfg = Release|Any CPU
78 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|Any CPU.Build.0 = Release|Any CPU
79 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x64.ActiveCfg = Release|Any CPU
80 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x64.Build.0 = Release|Any CPU
81 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x86.ActiveCfg = Release|Any CPU
82 + {A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x86.Build.0 = Release|Any CPU
83 {C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
84 {C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|Any CPU.Build.0 = Debug|Any CPU
85 {C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|x64.ActiveCfg = Debug|Any CPU
src/CSharp.Build.props
+1
@@ -8,5 +8,6 @@
8 <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
9 <SignAssembly>true</SignAssembly>
10 <AssemblyOriginatorKeyFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk))</AssemblyOriginatorKeyFile>
11 + <NBGV_EmitThisAssemblyClass>false</NBGV_EmitThisAssemblyClass>
12 </PropertyGroup>
13 </Project>
src/Directory.Build.targets
+8
@@ -9,6 +9,11 @@
9 See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10 -->
11 <Project>
12 + <PropertyGroup>
13 + <CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
14 + <DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
15 + </PropertyGroup>
16 +
17 <PropertyGroup>
18 <ReplacePackageReferences>true</ReplacePackageReferences>
19 <TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
@@ -45,4 +50,7 @@
50
51 </When>
52 </Choose>
53 +
54 + <Import Project="Wix.Build.targets" Condition=" Exists('Wix.Build.targets') And '$(MSBuildProjectExtension)'=='.wixproj' " />
55 + <Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " />
56 </Project>
src/WixToolset.Core.Burn/Bundles/BurnCommon.cs
+2 -2
@@ -9,7 +9,7 @@ namespace WixToolset.Core.Burn.Bundles
9 using WixToolset.Extensibility.Services;
10
11 /// <summary>
12 - /// Common functionality for Burn PE Writer & Reader for the WiX toolset.
12 + /// Common functionality for Burn PE Writer &amp; Reader for the WiX toolset.
13 /// </summary>
14 /// <remarks>This class encapsulates common functionality related to
15 /// bundled/chained setup packages.</remarks>
@@ -107,8 +107,8 @@ namespace WixToolset.Core.Burn.Bundles
107 /// <summary>
108 /// Creates a BurnCommon for re-writing a PE file.
109 /// </summary>
110 + /// <param name="messaging"></param>
111 /// <param name="fileExe">File to modify in-place.</param>
111 - /// <param name="bundleGuid">GUID for the bundle.</param>
112 public BurnCommon(IMessaging messaging, string fileExe)
113 {
114 this.messaging = messaging;
src/WixToolset.Core.Burn/Bundles/BurnReader.cs
+4
@@ -32,6 +32,7 @@ namespace WixToolset.Core.Burn.Bundles
32 /// <summary>
33 /// Creates a BurnReader for reading a PE file.
34 /// </summary>
35 + /// <param name="messaging"></param>
36 /// <param name="fileExe">File to read.</param>
37 private BurnReader(IMessaging messaging, string fileExe)
38 : base(messaging, fileExe)
@@ -58,6 +59,7 @@ namespace WixToolset.Core.Burn.Bundles
59 /// <summary>
60 /// Opens a Burn reader.
61 /// </summary>
62 + /// <param name="messaging"></param>
63 /// <param name="fileExe">Path to file.</param>
64 /// <returns>Burn reader.</returns>
65 public static BurnReader Open(IMessaging messaging, string fileExe)
@@ -77,6 +79,7 @@ namespace WixToolset.Core.Burn.Bundles
79 /// Gets the UX container from the exe and extracts its contents to the output directory.
80 /// </summary>
81 /// <param name="outputDirectory">Directory to write extracted files to.</param>
82 + /// <param name="tempDirectory">Scratch directory.</param>
83 /// <returns>True if successful, false otherwise</returns>
84 public bool ExtractUXContainer(string outputDirectory, string tempDirectory)
85 {
@@ -157,6 +160,7 @@ namespace WixToolset.Core.Burn.Bundles
160 /// Gets the attached container from the exe and extracts its contents to the output directory.
161 /// </summary>
162 /// <param name="outputDirectory">Directory to write extracted files to.</param>
163 + /// <param name="tempDirectory">Scratch directory.</param>
164 /// <returns>True if successful, false otherwise</returns>
165 public bool ExtractAttachedContainer(string outputDirectory, string tempDirectory)
166 {
src/WixToolset.Core.Burn/Bundles/BurnWriter.cs
+4 -1
@@ -29,8 +29,8 @@ namespace WixToolset.Core.Burn.Bundles
29 /// <summary>
30 /// Creates a BurnWriter for re-writing a PE file.
31 /// </summary>
32 + /// <param name="messaging"></param>
33 /// <param name="fileExe">File to modify in-place.</param>
33 - /// <param name="bundleGuid">GUID for the bundle.</param>
34 private BurnWriter(IMessaging messaging, string fileExe)
35 : base(messaging, fileExe)
36 {
@@ -39,6 +39,7 @@ namespace WixToolset.Core.Burn.Bundles
39 /// <summary>
40 /// Opens a Burn writer.
41 /// </summary>
42 + /// <param name="messaging"></param>
43 /// <param name="fileExe">Path to file.</param>
44 /// <returns>Burn writer.</returns>
45 public static BurnWriter Open(IMessaging messaging, string fileExe)
@@ -197,7 +198,9 @@ namespace WixToolset.Core.Burn.Bundles
198 /// Appends a container to the exe and updates the ".wixburn" section data to point to it.
199 /// </summary>
200 /// <param name="containerStream">File stream to append to the current exe.</param>
201 + /// <param name="containerSize">Size of the container.</param>
202 /// <param name="burnSectionOffsetSize">Offset of size field for this container in ".wixburn" section data.</param>
203 + /// <param name="burnSectionCount">Number of Burn sections.</param>
204 /// <returns>true if the container data is successfully appended; false otherwise</returns>
205 private bool AppendContainer(Stream containerStream, UInt32 containerSize, UInt32 burnSectionOffsetSize, UInt32 burnSectionCount)
206 {
src/WixToolset.Core.Burn/RowIndexedList.cs
+5 -5
@@ -7,18 +7,18 @@ namespace WixToolset.Core.Burn
7 using WixToolset.Data.WindowsInstaller;
8
9 /// <summary>
10 - /// A list of rows indexed by their primary key. Unlike a <see cref="RowDictionary"/>
10 + /// A list of rows indexed by their primary key. Unlike a RowDictionary
11 /// this indexed list will track rows in their added order and will allow rows with
12 /// duplicate keys to be added to the list, although only the first row will be indexed.
13 /// </summary>
14 - public sealed class RowIndexedList<T> : IList<T> where T : Row
14 + internal sealed class RowIndexedList<T> : IList<T> where T : Row
15 {
16 private Dictionary<string, T> index;
17 private List<T> rows;
18 private List<T> duplicates;
19
20 /// <summary>
21 - /// Creates an empty <see cref="RowIndexedList"/>.
21 + /// Creates an empty <see cref="RowIndexedList{T}"/>.
22 /// </summary>
23 public RowIndexedList()
24 {
@@ -28,7 +28,7 @@ namespace WixToolset.Core.Burn
28 }
29
30 /// <summary>
31 - /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given enumerator.
31 + /// Creates and populates a <see cref="RowIndexedList{T}"/> with the rows from the given enumerator.
32 /// </summary>
33 /// <param name="rows">Rows to index.</param>
34 public RowIndexedList(IEnumerable<T> rows)
@@ -41,7 +41,7 @@ namespace WixToolset.Core.Burn
41 }
42
43 /// <summary>
44 - /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given <see cref="Table"/>.
44 + /// Creates and populates a <see cref="RowIndexedList{T}"/> with the rows from the given <see cref="Table"/>.
45 /// </summary>
46 /// <param name="table">The table to index.</param>
47 /// <remarks>
src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
+3 -2
@@ -9,6 +9,7 @@
9 <Title>WiX Toolset Core Burn</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 + <CreateDocumentationFile>true</CreateDocumentationFile>
13 </PropertyGroup>
14
15 <ItemGroup>
@@ -28,8 +29,8 @@
29 <PackageReference Include="System.Security.Permissions" Version="4.6.0" />
30 <PackageReference Include="WixToolset.Burn" Version="4.0.*" />
31 <PackageReference Include="WixToolset.Core.Native" Version="4.0.*" />
31 - <PackageReference Include="WixToolset.Dtf.Resources" Version="4.0.*" NoWarn="NU1701" />
32 - <PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" NoWarn="NU1701" />
32 + <PackageReference Include="WixToolset.Dtf.Resources" Version="4.0.*" />
33 + <PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" />
34 </ItemGroup>
35
36 <ItemGroup>
src/WixToolset.Core.Burn/WixToolsetCoreServiceProviderExtensions.cs
+8
@@ -7,8 +7,16 @@ namespace WixToolset.Core.Burn
7 using WixToolset.Core.Burn.ExtensibilityServices;
8 using WixToolset.Extensibility.Services;
9
10 + /// <summary>
11 + /// Extensions methods for adding Burn services.
12 + /// </summary>
13 public static class WixToolsetCoreServiceProviderExtensions
14 {
15 + /// <summary>
16 + /// Adds Burn Services.
17 + /// </summary>
18 + /// <param name="coreProvider"></param>
19 + /// <returns></returns>
20 public static IWixToolsetCoreServiceProvider AddBundleBackend(this IWixToolsetCoreServiceProvider coreProvider)
21 {
22 AddServices(coreProvider);
src/WixToolset.Core.ExtensionCache/WixToolset.Core.ExtensionCache.csproj
+1
@@ -9,6 +9,7 @@
9 <Title>WiX Toolset Extension Cache</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 + <CreateDocumentationFile>true</CreateDocumentationFile>
13 </PropertyGroup>
14
15 <ItemGroup>
src/WixToolset.Core.ExtensionCache/WixToolsetCoreServiceProviderExtensions.cs
+8
@@ -6,8 +6,16 @@ namespace WixToolset.Core.ExtensionCache
6 using System.Collections.Generic;
7 using WixToolset.Extensibility.Services;
8
9 + /// <summary>
10 + /// Extensions methods for adding ExtensionCache services.
11 + /// </summary>
12 public static class WixToolsetCoreServiceProviderExtensions
13 {
14 + /// <summary>
15 + /// Adds ExtensionCache services.
16 + /// </summary>
17 + /// <param name="coreProvider"></param>
18 + /// <returns></returns>
19 public static IWixToolsetCoreServiceProvider AddExtensionCacheManager(this IWixToolsetCoreServiceProvider coreProvider)
20 {
21 var extensionManager = coreProvider.GetService<IExtensionManager>();
src/WixToolset.Core.TestPackage/BundleExtractor.cs
+44
@@ -7,8 +7,19 @@ namespace WixToolset.Core.TestPackage
7 using WixToolset.Core.Burn.Bundles;
8 using WixToolset.Extensibility.Services;
9
10 + /// <summary>
11 + /// Class to extract bundle contents for testing.
12 + /// </summary>
13 public class BundleExtractor
14 {
15 + /// <summary>
16 + /// Extracts the BA container.
17 + /// </summary>
18 + /// <param name="messaging"></param>
19 + /// <param name="bundleFilePath">Path to the bundle.</param>
20 + /// <param name="destinationFolderPath">Path to extract to.</param>
21 + /// <param name="tempFolderPath">Temp path for extraction.</param>
22 + /// <returns></returns>
23 public static ExtractBAContainerResult ExtractBAContainer(IMessaging messaging, string bundleFilePath, string destinationFolderPath, string tempFolderPath)
24 {
25 var result = new ExtractBAContainerResult();
@@ -33,6 +44,12 @@ namespace WixToolset.Core.TestPackage
44 return result;
45 }
46
47 + /// <summary>
48 + /// Gets an <see cref="XmlNamespaceManager"/> for BootstrapperApplicationData.xml with the given prefix assigned to the root namespace.
49 + /// </summary>
50 + /// <param name="document"></param>
51 + /// <param name="prefix"></param>
52 + /// <returns></returns>
53 public static XmlNamespaceManager GetBADataNamespaceManager(XmlDocument document, string prefix)
54 {
55 var namespaceManager = new XmlNamespaceManager(document.NameTable);
@@ -40,6 +57,12 @@ namespace WixToolset.Core.TestPackage
57 return namespaceManager;
58 }
59
60 + /// <summary>
61 + /// Gets an <see cref="XmlNamespaceManager"/> for BundleExtensionData.xml with the given prefix assigned to the root namespace.
62 + /// </summary>
63 + /// <param name="document"></param>
64 + /// <param name="prefix"></param>
65 + /// <returns></returns>
66 public static XmlNamespaceManager GetBundleExtensionDataNamespaceManager(XmlDocument document, string prefix)
67 {
68 var namespaceManager = new XmlNamespaceManager(document.NameTable);
@@ -47,6 +70,12 @@ namespace WixToolset.Core.TestPackage
70 return namespaceManager;
71 }
72
73 + /// <summary>
74 + /// Gets an <see cref="XmlNamespaceManager"/> for the Burn manifest.xml with the given prefix assigned to the root namespace.
75 + /// </summary>
76 + /// <param name="document"></param>
77 + /// <param name="prefix"></param>
78 + /// <returns></returns>
79 public static XmlNamespaceManager GetBurnNamespaceManager(XmlDocument document, string prefix)
80 {
81 var namespaceManager = new XmlNamespaceManager(document.NameTable);
@@ -54,6 +83,11 @@ namespace WixToolset.Core.TestPackage
83 return namespaceManager;
84 }
85
86 + /// <summary>
87 + /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container.
88 + /// </summary>
89 + /// <param name="baFolderPath"></param>
90 + /// <returns></returns>
91 public static XmlDocument LoadBAData(string baFolderPath)
92 {
93 var document = new XmlDocument();
@@ -61,6 +95,11 @@ namespace WixToolset.Core.TestPackage
95 return document;
96 }
97
98 + /// <summary>
99 + /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container.
100 + /// </summary>
101 + /// <param name="baFolderPath"></param>
102 + /// <returns></returns>
103 public static XmlDocument LoadBundleExtensionData(string baFolderPath)
104 {
105 var document = new XmlDocument();
@@ -68,6 +107,11 @@ namespace WixToolset.Core.TestPackage
107 return document;
108 }
109
110 + /// <summary>
111 + /// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container.
112 + /// </summary>
113 + /// <param name="baFolderPath"></param>
114 + /// <returns></returns>
115 public static XmlDocument LoadBurnManifest(string baFolderPath)
116 {
117 var document = new XmlDocument();
src/WixToolset.Core.TestPackage/ExtractBAContainerResult.cs
+45
@@ -6,22 +6,61 @@ namespace WixToolset.Core.TestPackage
6 using System.Xml;
7 using Xunit;
8
9 + /// <summary>
10 + /// The result of extracting the BA container.
11 + /// </summary>
12 public class ExtractBAContainerResult
13 {
14 + /// <summary>
15 + /// <see cref="XmlDocument"/> for BundleExtensionData.xml.
16 + /// </summary>
17 public XmlDocument BundleExtensionDataDocument { get; set; }
18 +
19 + /// <summary>
20 + /// <see cref="XmlNamespaceManager"/> for BundleExtensionData.xml.
21 + /// </summary>
22 public XmlNamespaceManager BundleExtensionDataNamespaceManager { get; set; }
23 +
24 + /// <summary>
25 + /// <see cref="XmlDocument"/> for BootstrapperApplicationData.xml.
26 + /// </summary>
27 public XmlDocument BADataDocument { get; set; }
28 +
29 + /// <summary>
30 + /// <see cref="XmlNamespaceManager"/> for BootstrapperApplicationData.xml.
31 + /// </summary>
32 public XmlNamespaceManager BADataNamespaceManager { get; set; }
33 +
34 + /// <summary>
35 + /// <see cref="XmlDocument"/> for the Burn manifest.xml.
36 + /// </summary>
37 public XmlDocument ManifestDocument { get; set; }
38 +
39 + /// <summary>
40 + /// <see cref="XmlNamespaceManager"/> for the Burn manifest.xml.
41 + /// </summary>
42 public XmlNamespaceManager ManifestNamespaceManager { get; set; }
43 +
44 + /// <summary>
45 + /// Whether extraction succeeded.
46 + /// </summary>
47 public bool Success { get; set; }
48
49 + /// <summary>
50 + ///
51 + /// </summary>
52 + /// <returns></returns>
53 public ExtractBAContainerResult AssertSuccess()
54 {
55 Assert.True(this.Success);
56 return this;
57 }
58
59 + /// <summary>
60 + /// Returns the relative path of the BA entry point dll in the given folder.
61 + /// </summary>
62 + /// <param name="extractedBAContainerFolderPath"></param>
63 + /// <returns></returns>
64 public string GetBAFilePath(string extractedBAContainerFolderPath)
65 {
66 var uxPayloads = this.SelectManifestNodes("/burn:BurnManifest/burn:UX/burn:Payload");
@@ -30,6 +69,12 @@ namespace WixToolset.Core.TestPackage
69 return Path.Combine(extractedBAContainerFolderPath, relativeBAPath);
70 }
71
72 + /// <summary>
73 + /// Returns the relative path of the BundleExtension entry point dll in the given folder.
74 + /// </summary>
75 + /// <param name="extractedBAContainerFolderPath"></param>
76 + /// <param name="extensionId"></param>
77 + /// <returns></returns>
78 public string GetBundleExtensionFilePath(string extractedBAContainerFolderPath, string extensionId)
79 {
80 var uxPayloads = this.SelectManifestNodes($"/burn:BurnManifest/burn:UX/burn:Payload[@Id='{extensionId}']");
src/WixToolset.Core.TestPackage/TestMessageListener.cs
+27
@@ -5,24 +5,51 @@ using WixToolset.Extensibility.Services;
5
6 namespace WixToolset.Core.TestPackage
7 {
8 + /// <summary>
9 + /// An <see cref="IMessageListener"/> that simply stores all the messages.
10 + /// </summary>
11 public sealed class TestMessageListener : IMessageListener
12 {
13 + /// <summary>
14 + /// All messages that have been received.
15 + /// </summary>
16 public List<Message> Messages { get; } = new List<Message>();
17
18 + /// <summary>
19 + ///
20 + /// </summary>
21 public string ShortAppName => "TEST";
22
23 + /// <summary>
24 + ///
25 + /// </summary>
26 public string LongAppName => "Test";
27
28 + /// <summary>
29 + /// Stores the message in <see cref="Messages"/>.
30 + /// </summary>
31 + /// <param name="message"></param>
32 public void Write(Message message)
33 {
34 this.Messages.Add(message);
35 }
36
37 + /// <summary>
38 + /// Stores the message in <see cref="Messages"/>.
39 + /// </summary>
40 + /// <param name="message"></param>
41 public void Write(string message)
42 {
43 this.Messages.Add(new Message(null, MessageLevel.Information, 0, message));
44 }
45
46 + /// <summary>
47 + /// Always returns defaultMessageLevel.
48 + /// </summary>
49 + /// <param name="messaging"></param>
50 + /// <param name="message"></param>
51 + /// <param name="defaultMessageLevel"></param>
52 + /// <returns></returns>
53 public MessageLevel CalculateMessageLevel(IMessaging messaging, Message message, MessageLevel defaultMessageLevel) => defaultMessageLevel;
54 }
55 }
src/WixToolset.Core.TestPackage/WixRunner.cs
+21 -1
@@ -9,11 +9,19 @@ namespace WixToolset.Core.TestPackage
9 using WixToolset.Core.Burn;
10 using WixToolset.Core.WindowsInstaller;
11 using WixToolset.Data;
12 - using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
13
14 + /// <summary>
15 + /// Utility class to emulate wix.exe with standard backends.
16 + /// </summary>
17 public static class WixRunner
18 {
19 + /// <summary>
20 + /// Emulates calling wix.exe with standard backends.
21 + /// </summary>
22 + /// <param name="args"></param>
23 + /// <param name="messages"></param>
24 + /// <returns></returns>
25 public static int Execute(string[] args, out List<Message> messages)
26 {
27 var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
@@ -21,6 +29,11 @@ namespace WixToolset.Core.TestPackage
29 return task.Result;
30 }
31
32 + /// <summary>
33 + /// Emulates calling wix.exe with standard backends.
34 + /// </summary>
35 + /// <param name="args"></param>
36 + /// <returns></returns>
37 public static WixRunnerResult Execute(params string[] args)
38 {
39 var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
@@ -28,6 +41,13 @@ namespace WixToolset.Core.TestPackage
41 return new WixRunnerResult { ExitCode = exitCode.Result, Messages = messages.ToArray() };
42 }
43
44 + /// <summary>
45 + /// Emulates calling wix.exe with standard backends.
46 + /// </summary>
47 + /// <param name="args"></param>
48 + /// <param name="coreProvider"></param>
49 + /// <param name="messages"></param>
50 + /// <returns></returns>
51 public static Task<int> Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List<Message> messages)
52 {
53 coreProvider.AddWindowsInstallerBackend()
src/WixToolset.Core.TestPackage/WixRunnerResult.cs
+13
@@ -7,12 +7,25 @@ namespace WixToolset.Core.TestPackage
7 using WixToolset.Data;
8 using Xunit;
9
10 + /// <summary>
11 + /// The result of an Execute method of <see cref="WixRunner"/>.
12 + /// </summary>
13 public class WixRunnerResult
14 {
15 + /// <summary>
16 + /// ExitCode for the operation.
17 + /// </summary>
18 public int ExitCode { get; set; }
19
20 + /// <summary>
21 + /// Messages from the operation.
22 + /// </summary>
23 public Message[] Messages { get; set; }
24
25 + /// <summary>
26 + ///
27 + /// </summary>
28 + /// <returns></returns>
29 public WixRunnerResult AssertSuccess()
30 {
31 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");
src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj
+1
@@ -8,6 +8,7 @@
8 <Description>Internal WiX Toolset Test Package</Description>
9 <DebugType>embedded</DebugType>
10 <PublishRepositoryUrl>true</PublishRepositoryUrl>
11 + <CreateDocumentationFile>true</CreateDocumentationFile>
12 </PropertyGroup>
13
14 <ItemGroup>
src/WixToolset.Core.TestPackage/XmlNodeExtensions.cs
+15
@@ -7,13 +7,28 @@ namespace WixToolset.Core.TestPackage
7 using System.Text.RegularExpressions;
8 using System.Xml;
9
10 + /// <summary>
11 + /// Utility class to help compare XML in tests using string comparisons by using single quotes and stripping all namespaces.
12 + /// </summary>
13 public static class XmlNodeExtensions
14 {
15 + /// <summary>
16 + /// Returns the node's outer XML using single quotes and stripping all namespaces.
17 + /// </summary>
18 + /// <param name="node"></param>
19 + /// <param name="ignoredAttributesByElementName">Attributes for which the value should be set to '*'.</param>
20 + /// <returns></returns>
21 public static string GetTestXml(this XmlNode node, Dictionary<string, List<string>> ignoredAttributesByElementName = null)
22 {
23 return node.OuterXml.GetTestXml(ignoredAttributesByElementName);
24 }
25
26 + /// <summary>
27 + /// Returns the XML using single quotes and stripping all namespaces.
28 + /// </summary>
29 + /// <param name="xml"></param>
30 + /// <param name="ignoredAttributesByElementName">Attributes for which the value should be set to '*'.</param>
31 + /// <returns></returns>
32 public static string GetTestXml(this string xml, Dictionary<string, List<string>> ignoredAttributesByElementName = null)
33 {
34 string formattedXml;
src/WixToolset.Core.WindowsInstaller/Bind/AssignMediaCommand.cs
+1 -2
@@ -115,7 +115,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
115 /// <summary>
116 /// Assign files to cabinets based on MediaTemplate authoring.
117 /// </summary>
118 - /// <param name="fileFacades">FileRowCollection</param>
118 private void AutoAssignFiles(List<MediaSymbol> mediaTable, Dictionary<MediaSymbol, List<FileFacade>> filesByCabinetMedia, List<FileFacade> uncompressedFiles)
119 {
120 const int MaxCabIndex = 999;
@@ -295,7 +294,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
294 /// <summary>
295 /// Adds a symbol to the section with cab name template filled in.
296 /// </summary>
298 - /// <param name="mediaTable"></param>
297 + /// <param name="mediaTemplateSymbol"></param>
298 /// <param name="cabIndex"></param>
299 /// <returns></returns>
300 private MediaSymbol AddMediaSymbol(WixMediaTemplateSymbol mediaTemplateSymbol, int cabIndex)
src/WixToolset.Core.WindowsInstaller/Bind/CabinetBuilder.cs
+1
@@ -28,6 +28,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
28 /// <summary>
29 /// Instantiate a new CabinetBuilder.
30 /// </summary>
31 + /// <param name="messaging"></param>
32 /// <param name="threadCount">number of threads to use</param>
33 /// <param name="newCabNamesCallBackAddress">Address of Binder's callback function for Cabinet Splitting</param>
34 public CabinetBuilder(IMessaging messaging, int threadCount, IntPtr newCabNamesCallBackAddress)
src/WixToolset.Core.WindowsInstaller/Bind/CabinetResolver.cs
+1 -1
@@ -13,7 +13,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
13 using WixToolset.Extensibility.Data;
14 using WixToolset.Extensibility.Services;
15
16 - public class CabinetResolver
16 + internal class CabinetResolver
17 {
18 public CabinetResolver(IWixToolsetServiceProvider serviceProvider, string cabCachePath, IEnumerable<IWindowsInstallerBackendBinderExtension> backendExtensions)
19 {
src/WixToolset.Core.WindowsInstaller/Bind/CabinetWorkItem.cs
+6 -5
@@ -18,7 +18,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
18 /// <param name="cabinetFile">The cabinet file.</param>
19 /// <param name="maxThreshold">Maximum threshold for each cabinet.</param>
20 /// <param name="compressionLevel">The compression level of the cabinet.</param>
21 - /// <param name="binderFileManager">The binder file manager.</param>
21 + /// <param name="modularizationSuffix">Modularization suffix used when building a Merge Module.</param>
22 + /// <!--<param name="binderFileManager">The binder file manager.</param>-->
23 public CabinetWorkItem(IEnumerable<FileFacade> fileFacades, string cabinetFile, int maxThreshold, CompressionLevel compressionLevel, string modularizationSuffix /*, BinderFileManager binderFileManager*/)
24 {
25 this.CabinetFile = cabinetFile;
@@ -52,10 +53,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
53 /// <value>The collection of files in this cabinet.</value>
54 public IEnumerable<FileFacade> FileFacades { get; }
55
55 - /// <summary>
56 - /// Gets the binder file manager.
57 - /// </summary>
58 - /// <value>The binder file manager.</value>
56 + // <summary>
57 + // Gets the binder file manager.
58 + // </summary>
59 + // <value>The binder file manager.</value>
60 //public BinderFileManager BinderFileManager { get; private set; }
61
62 /// <summary>
src/WixToolset.Core.WindowsInstaller/Bind/CreateCabinetsCommand.cs
+2 -4
@@ -90,9 +90,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
90
91 public IEnumerable<ITrackedFile> TrackedFiles => this.trackedFiles;
92
93 - /// <param name="output">Output to generate image for.</param>
94 - /// <param name="layoutDirectory">The directory in which the image should be layed out.</param>
95 - /// <param name="compressed">Flag if source image should be compressed.</param>
93 public void Execute()
94 {
95 this.lastCabinetAddedToMediaTable = new Dictionary<string, string>();
@@ -177,6 +174,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
174 /// <param name="output">Output for the current database.</param>
175 /// <param name="cabinetDir">Directory to create cabinet in.</param>
176 /// <param name="mediaSymbol">Media symbol containing information about the cabinet.</param>
177 + /// <param name="compressionLevel">Desired compression level.</param>
178 /// <param name="fileFacades">Collection of files in this cabinet.</param>
179 /// <returns>created CabinetWorkItem object</returns>
180 private CabinetWorkItem CreateCabinetWorkItem(WindowsInstallerData output, string cabinetDir, MediaSymbol mediaSymbol, CompressionLevel compressionLevel, IEnumerable<FileFacade> fileFacades)
@@ -284,7 +282,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
282 /// This callback will not be called in case there is no File splitting. i.e. MaximumCabinetSizeForLargeFileSplitting was not authored
283 /// </summary>
284 /// <param name="firstCabName">The name of splitting cabinet without extention e.g. "cab1".</param>
287 - /// <param name="newCabName">The name of the new cabinet that would be formed by splitting e.g. "cab1b.cab"</param>
285 + /// <param name="newCabinetName">The name of the new cabinet that would be formed by splitting e.g. "cab1b.cab"</param>
286 /// <param name="fileToken">The file token of the first file present in the splitting cabinet</param>
287 internal void NewCabNamesCallBack([MarshalAs(UnmanagedType.LPWStr)]string firstCabName, [MarshalAs(UnmanagedType.LPWStr)]string newCabinetName, [MarshalAs(UnmanagedType.LPWStr)]string fileToken)
288 {
src/WixToolset.Core.WindowsInstaller/Bind/GenerateDatabaseCommand.cs
+1 -1
@@ -55,7 +55,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
55 public List<ITrackedFile> GeneratedTemporaryFiles { get; } = new List<ITrackedFile>();
56
57 /// <summary>
58 - /// Whether to use a subdirectory based on the <paramref name="databaseFile"/> file name for intermediate files.
58 + /// Whether to use a subdirectory based on the database file name for intermediate files.
59 /// </summary>
60 private bool SuppressAddingValidationRows { get; }
61
src/WixToolset.Core.WindowsInstaller/Bind/GenerateTransformCommand.cs
+1 -5
@@ -15,7 +15,7 @@ namespace WixToolset.Core.WindowsInstaller
15 /// <summary>
16 /// Creates a transform by diffing two outputs.
17 /// </summary>
18 - public sealed class GenerateTransformCommand
18 + internal class GenerateTransformCommand
19 {
20 private const char sectionDelimiter = '/';
21 private readonly IMessaging messaging;
@@ -62,10 +62,6 @@ namespace WixToolset.Core.WindowsInstaller
62 /// <summary>
63 /// Creates a transform by diffing two outputs.
64 /// </summary>
65 - /// <param name="targetOutput">The target output.</param>
66 - /// <param name="updatedOutput">The updated output.</param>
67 - /// <param name="validationFlags"></param>
68 - /// <returns>The transform.</returns>
65 public WindowsInstallerData Execute()
66 {
67 var targetOutput = this.TargetOutput;
src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs
+1 -1
@@ -384,7 +384,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
384 /// <summary>
385 /// Signal a warning if a non-keypath file was changed in a patch without also changing the keypath file of the component.
386 /// </summary>
387 - /// <param name="output">The output to validate.</param>
387 + /// <param name="transform">The output to validate.</param>
388 private void ValidateFileRowChanges(WindowsInstallerData transform)
389 {
390 var componentTable = transform.Tables["Component"];
src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+12 -9
@@ -248,19 +248,20 @@ namespace WixToolset.Core.WindowsInstaller
248 private XElement GetIndexedElement(string table, params string[] primaryKey) => this.IndexedElements[String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey))];
249
250 /// <summary>
251 - /// Gets the element corresponding to the primary key of the given table.
251 + /// Tries to get the element corresponding to the primary key of the given table.
252 /// </summary>
253 - /// <param name="table">The table corresponding to the element.</param>
254 - /// <param name="primaryKey">The primary key corresponding to the element.</param>
255 - /// <returns>The indexed element.</returns>
253 + /// <param name="row">The table corresponding to the element.</param>
254 + /// <param name="xElement">The indexed element.</param>
255 + /// <returns>Whether the element was found.</returns>
256 private bool TryGetIndexedElement(WixToolset.Data.WindowsInstaller.Row row, out XElement xElement) => this.TryGetIndexedElement(row.TableDefinition.Name, out xElement, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter));
257
258 /// <summary>
259 - /// Gets the element corresponding to the primary key of the given table.
259 + /// Tries to get the element corresponding to the primary key of the given table.
260 /// </summary>
261 /// <param name="table">The table corresponding to the element.</param>
262 + /// <param name="xElement">The indexed element.</param>
263 /// <param name="primaryKey">The primary key corresponding to the element.</param>
263 - /// <returns>The indexed element.</returns>
264 + /// <returns>Whether the element was found.</returns>
265 private bool TryGetIndexedElement(string table, out XElement xElement, params string[] primaryKey) => this.IndexedElements.TryGetValue(String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey)), out xElement);
266
267 /// <summary>
@@ -276,8 +277,9 @@ namespace WixToolset.Core.WindowsInstaller
277 /// <summary>
278 /// Index an element by its corresponding row.
279 /// </summary>
279 - /// <param name="row">The row corresponding to the element.</param>
280 /// <param name="element">The element to index.</param>
281 + /// <param name="table"></param>
282 + /// <param name="primaryKey"></param>
283 private void IndexElement(XElement element, string table, params string[] primaryKey)
284 {
285 this.IndexedElements.Add(String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey)), element);
@@ -342,7 +344,7 @@ namespace WixToolset.Core.WindowsInstaller
344 /// Set the common control attributes in a control element.
345 /// </summary>
346 /// <param name="attributes">The control attributes.</param>
345 - /// <param name="control">The control element.</param>
347 + /// <param name="xControl">The control element.</param>
348 private static void SetControlAttributes(int attributes, XElement xControl)
349 {
350 if (0 == (attributes & WindowsInstallerConstants.MsidbControlAttributesEnabled))
@@ -2424,6 +2426,7 @@ namespace WixToolset.Core.WindowsInstaller
2426 /// Initialize decompilation.
2427 /// </summary>
2428 /// <param name="tables">The collection of all tables.</param>
2429 + /// <param name="codepage"></param>
2430 private void InitializeDecompile(TableIndexedCollection tables, int codepage)
2431 {
2432 // reset all the state information
@@ -2983,7 +2986,7 @@ namespace WixToolset.Core.WindowsInstaller
2986 /// <summary>
2987 /// Decompile the _SummaryInformation table.
2988 /// </summary>
2986 - /// <param name="table">The table to decompile.</param>
2989 + /// <param name="tables">The tables to decompile.</param>
2990 private void FinalizeSummaryInformationStream(TableIndexedCollection tables)
2991 {
2992 var table = tables["_SummaryInformation"];
src/WixToolset.Core.WindowsInstaller/Msi/MsiInterop.cs
+1 -1
@@ -177,7 +177,7 @@ namespace WixToolset.Core.WindowsInstaller.Msi
177 /// <summary>
178 /// Class exposing static functions and structs from MSI API.
179 /// </summary>
180 - public sealed class MsiInterop
180 + internal sealed class MsiInterop
181 {
182 // Patching constants
183 public const int MsiMaxStreamNameLength = 62; // http://msdn2.microsoft.com/library/aa370551.aspx
src/WixToolset.Core.WindowsInstaller/RowDictionary.cs
+6 -6
@@ -7,13 +7,13 @@ namespace WixToolset.Core.WindowsInstaller
7 using WixToolset.Data.WindowsInstaller;
8
9 /// <summary>
10 - /// A dictionary of rows. Unlike the <see cref="RowIndexedCollection"/> this
10 + /// A dictionary of rows. Unlike the RowIndexedList this
11 /// will throw when multiple rows with the same key are added.
12 /// </summary>
13 - public sealed class RowDictionary<T> : Dictionary<string, T> where T : Row
13 + internal sealed class RowDictionary<T> : Dictionary<string, T> where T : Row
14 {
15 /// <summary>
16 - /// Creates an empty <see cref="RowDictionary"/>.
16 + /// Creates an empty <see cref="RowDictionary{T}"/>.
17 /// </summary>
18 public RowDictionary()
19 : base(StringComparer.InvariantCulture)
@@ -21,9 +21,9 @@ namespace WixToolset.Core.WindowsInstaller
21 }
22
23 /// <summary>
24 - /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given enumerator.
24 + /// Creates and populates a <see cref="RowDictionary{T}"/> with the rows from the given enumerator.
25 /// </summary>
26 - /// <param name="Rows">Rows to add.</param>
26 + /// <param name="rows">Rows to add.</param>
27 public RowDictionary(IEnumerable<T> rows)
28 : this()
29 {
@@ -34,7 +34,7 @@ namespace WixToolset.Core.WindowsInstaller
34 }
35
36 /// <summary>
37 - /// Creates and populates a <see cref="RowDictionary"/> with the rows from the given <see cref="Table"/>.
37 + /// Creates and populates a <see cref="RowDictionary{T}"/> with the rows from the given <see cref="Table"/>.
38 /// </summary>
39 /// <param name="table">The table to index.</param>
40 /// <remarks>
src/WixToolset.Core.WindowsInstaller/Unbinder.cs
+1 -1
@@ -11,7 +11,7 @@ namespace WixToolset.Core
11 /// <summary>
12 /// Unbinder core of the WiX toolset.
13 /// </summary>
14 - public sealed class Unbinder
14 + internal sealed class Unbinder
15 {
16 public IEnumerable<IBackendFactory> BackendFactories { get; }
17
src/WixToolset.Core.WindowsInstaller/Validator.cs
+1 -1
@@ -22,7 +22,7 @@ namespace WixToolset.Core.WindowsInstaller
22 /// <summary>
23 /// Runs internal consistency evaluators (ICEs) from cub files against a database.
24 /// </summary>
25 - public sealed class Validator
25 + internal sealed class Validator
26 {
27 private string actionName;
28 private StringCollection cubeFiles;
src/WixToolset.Core.WindowsInstaller/ValidatorExtension.cs
+3 -3
@@ -52,7 +52,7 @@ namespace WixToolset.Extensibility
52 /// Called at the beginning of the validation of a database file.
53 /// </summary>
54 /// <remarks>
55 - /// <para>The <see cref="Validator"/> will set
55 + /// <para>The Validator will set
56 /// <see cref="DatabaseFile"/> before calling InitializeValidator.</para>
57 /// <para><b>Notes to Inheritors:</b> When overriding
58 /// <b>InitializeValidator</b> in a derived class, be sure to call
@@ -83,7 +83,7 @@ namespace WixToolset.Extensibility
83 }
84
85 /// <summary>
86 - /// Logs a message from the <see cref="Validator"/>.
86 + /// Logs a message from the Validator.
87 /// </summary>
88 /// <param name="message">A <see cref="String"/> of tab-delmited tokens
89 /// in the validation message.</param>
@@ -93,7 +93,7 @@ namespace WixToolset.Extensibility
93 }
94
95 /// <summary>
96 - /// Logs a message from the <see cref="Validator"/>.
96 + /// Logs a message from the Validator.
97 /// </summary>
98 /// <param name="message">A <see cref="String"/> of tab-delmited tokens
99 /// in the validation message.</param>
src/WixToolset.Core.WindowsInstaller/WixToolset.Core.WindowsInstaller.csproj
+2 -1
@@ -9,6 +9,7 @@
9 <Title>WiX Toolset Core Windows Installer</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 + <CreateDocumentationFile>true</CreateDocumentationFile>
13 </PropertyGroup>
14
15 <ItemGroup>
@@ -17,7 +18,7 @@
18
19 <ItemGroup>
20 <PackageReference Include="WixToolset.Core.Native" Version="4.0.*" />
20 - <PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" NoWarn="NU1701" />
21 + <PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" />
22 </ItemGroup>
23
24 <ItemGroup>
src/WixToolset.Core.WindowsInstaller/WixToolsetCoreServiceProviderExtensions.cs
+8
@@ -7,8 +7,16 @@ namespace WixToolset.Core.WindowsInstaller
7 using WixToolset.Core.WindowsInstaller.ExtensibilityServices;
8 using WixToolset.Extensibility.Services;
9
10 + /// <summary>
11 + /// Extensions methods for adding WindowsInstaller services.
12 + /// </summary>
13 public static class WixToolsetCoreServiceProviderExtensions
14 {
15 + /// <summary>
16 + /// Adds WindowsInstaller services.
17 + /// </summary>
18 + /// <param name="coreProvider"></param>
19 + /// <returns></returns>
20 public static IWixToolsetCoreServiceProvider AddWindowsInstallerBackend(this IWixToolsetCoreServiceProvider coreProvider)
21 {
22 AddServices(coreProvider);
src/WixToolset.Core/Bind/ExtractEmbeddedFilesCommand.cs
+1
@@ -9,6 +9,7 @@ namespace WixToolset.Core.Bind
9 using WixToolset.Extensibility.Data;
10 using WixToolset.Extensibility.Services;
11
12 +#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility
13 public class ExtractEmbeddedFilesCommand
14 {
15 public ExtractEmbeddedFilesCommand(IBackendHelper backendHelper, IEnumerable<IExpectedExtractFile> embeddedFiles)
src/WixToolset.Core/Bind/FileFacade.cs
+1
@@ -9,6 +9,7 @@ namespace WixToolset.Core.Bind
9 using WixToolset.Data.WindowsInstaller;
10 using WixToolset.Data.WindowsInstaller.Rows;
11
12 +#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility
13 public class FileFacade
14 {
15 public FileFacade(FileSymbol file, AssemblySymbol assembly)
src/WixToolset.Core/Bind/FileResolver.cs
+1 -1
@@ -67,7 +67,7 @@ namespace WixToolset.Core.Bind
67 /// Resolves the source path of a file using binder extensions.
68 /// </summary>
69 /// <param name="source">Original source value.</param>
70 - /// <param name="type">Optional type of source file being resolved.</param>
70 + /// <param name="symbolDefinition">Optional type of source file being resolved.</param>
71 /// <param name="sourceLineNumbers">Optional source line of source file being resolved.</param>
72 /// <param name="bindStage">The binding stage used to determine what collection of bind paths will be used</param>
73 /// <param name="alreadyCheckedPaths">Optional collection of paths already checked.</param>
src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs
+2
@@ -10,6 +10,7 @@ namespace WixToolset.Core.Bind
10 using WixToolset.Extensibility.Data;
11 using WixToolset.Extensibility.Services;
12
13 +#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility
14 /// <summary>
15 /// Resolves the fields which had variables that needed to be resolved after the file information
16 /// was loaded.
@@ -19,6 +20,7 @@ namespace WixToolset.Core.Bind
20 /// <summary>
21 /// Resolve delayed fields.
22 /// </summary>
23 + /// <param name="messaging"></param>
24 /// <param name="delayedFields">The fields which had resolution delayed.</param>
25 /// <param name="variableCache">The file information to use when resolving variables.</param>
26 public ResolveDelayedFieldsCommand(IMessaging messaging, IEnumerable<IDelayedField> delayedFields, Dictionary<string, string> variableCache)
src/WixToolset.Core/CommandLine/CommandLineParser.cs
-1
@@ -192,7 +192,6 @@ namespace WixToolset.Core.CommandLine
192 /// or DirectoryInfo.GetFiles. The only way to get this directory path is manually since
193 /// Path.GetDirectoryName does not support ".." in the path.
194 /// </remarks>
195 - /// <exception cref="WixFileNotFoundException">Throws WixFileNotFoundException if no file matching the pattern can be found.</exception>
195 private string[] GetFiles(string searchPath, string fileType)
196 {
197 if (null == searchPath)
src/WixToolset.Core/Common.cs
+33 -4
@@ -21,9 +21,21 @@ namespace WixToolset.Core
21 public static class Common
22 {
23 // TODO: Find a place to put all of these so they doesn't have to be public and exposed by WixToolset.Core.dll
24 + /// <summary>
25 + ///
26 + /// </summary>
27 public const string UpgradeDetectedProperty = "WIX_UPGRADE_DETECTED";
28 + /// <summary>
29 + ///
30 + /// </summary>
31 public const string UpgradePreventedCondition = "NOT WIX_UPGRADE_DETECTED";
32 + /// <summary>
33 + ///
34 + /// </summary>
35 public const string DowngradeDetectedProperty = "WIX_DOWNGRADE_DETECTED";
36 + /// <summary>
37 + ///
38 + /// </summary>
39 public const string DowngradePreventedCondition = "NOT WIX_DOWNGRADE_DETECTED";
40
41 //-------------------------------------------------------------------------------------------------
@@ -51,6 +63,9 @@ namespace WixToolset.Core
63 // GENERIC_WRITE (0x40000000L)
64 // GENERIC_READ (0x80000000L)
65 // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
66 + /// <summary>
67 + ///
68 + /// </summary>
69 public static readonly string[] GenericPermissions = { "GenericAll", "GenericExecute", "GenericWrite", "GenericRead" };
70
71 // Standard Access Rights (per WinNT.h)
@@ -61,6 +76,9 @@ namespace WixToolset.Core
76 // WRITE_OWNER (0x00080000L)
77 // SYNCHRONIZE (0x00100000L)
78 // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
79 + /// <summary>
80 + ///
81 + /// </summary>
82 public static readonly string[] StandardPermissions = { "Delete", "ReadPermission", "ChangePermission", "TakeOwnership", "Synchronize" };
83
84 // Object-Specific Access Rights
@@ -77,11 +95,17 @@ namespace WixToolset.Core
95 // FILE_READ_ATTRIBUTES ( 0x0080 )
96 // FILE_WRITE_ATTRIBUTES ( 0x0100 )
97 // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
98 + /// <summary>
99 + ///
100 + /// </summary>
101 public static readonly string[] FolderPermissions = { "Read", "CreateFile", "CreateChild", "ReadExtendedAttributes", "WriteExtendedAttributes", "Traverse", "DeleteChild", "ReadAttributes", "WriteAttributes" };
102
103 // Registry Access Rights (per TODO)
104 // ----------------------
105 // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
106 + /// <summary>
107 + ///
108 + /// </summary>
109 public static readonly string[] RegistryPermissions = { "Read", "Write", "CreateSubkeys", "EnumerateSubkeys", "Notify", "CreateLink" };
110
111 // File Access Rights (per WinNT.h)
@@ -99,6 +123,9 @@ namespace WixToolset.Core
123 // STANDARD_RIGHTS_REQUIRED (0x000F0000L)
124 // FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
125 // TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
126 + /// <summary>
127 + ///
128 + /// </summary>
129 public static readonly string[] FilePermissions = { "Read", "Write", "Append", "ReadExtendedAttributes", "WriteExtendedAttributes", "Execute", "FileAllRights", "ReadAttributes", "WriteAttributes" };
130
131 internal static readonly char[] IllegalLongFilenameCharacters = new[] { '\\', '/', '?', '*', '|', '>', '<', ':', '\"' }; // illegal: \ / ? | > < : / * "
@@ -596,10 +623,10 @@ namespace WixToolset.Core
623 /// <summary>
624 /// Get an attribute value.
625 /// </summary>
626 + /// <param name="messaging"></param>
627 /// <param name="sourceLineNumbers">Source line information about the owner element.</param>
628 /// <param name="attribute">The attribute containing the value to get.</param>
629 /// <param name="emptyRule">A rule for the contents of the value. If the contents do not follow the rule, an error is thrown.</param>
602 - /// <param name="messageHandler">A delegate that receives error messages.</param>
630 /// <returns>The attribute's value.</returns>
631 internal static string GetAttributeValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute, EmptyRule emptyRule)
632 {
@@ -641,9 +668,9 @@ namespace WixToolset.Core
668 /// <summary>
669 /// Get an identifier attribute value and displays an error for an illegal identifier value.
670 /// </summary>
671 + /// <param name="messaging"></param>
672 /// <param name="sourceLineNumbers">Source line information about the owner element.</param>
673 /// <param name="attribute">The attribute containing the value to get.</param>
646 - /// <param name="messageHandler">A delegate that receives error messages.</param>
674 /// <returns>The attribute's identifier value or a special value if an error occurred.</returns>
675 internal static string GetAttributeIdentifierValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute)
676 {
@@ -676,11 +703,11 @@ namespace WixToolset.Core
703 /// <summary>
704 /// Get an integer attribute value and displays an error for an illegal integer value.
705 /// </summary>
706 + /// <param name="messaging"></param>
707 /// <param name="sourceLineNumbers">Source line information about the owner element.</param>
708 /// <param name="attribute">The attribute containing the value to get.</param>
709 /// <param name="minimum">The minimum legal value.</param>
710 /// <param name="maximum">The maximum legal value.</param>
683 - /// <param name="messageHandler">A delegate that receives error messages.</param>
711 /// <returns>The attribute's integer value or a special value if an error occurred during conversion.</returns>
712 public static int GetAttributeIntegerValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute, int minimum, int maximum)
713 {
@@ -715,9 +742,9 @@ namespace WixToolset.Core
742 /// <summary>
743 /// Gets a yes/no value and displays an error for an illegal yes/no value.
744 /// </summary>
745 + /// <param name="messaging"></param>
746 /// <param name="sourceLineNumbers">Source line information about the owner element.</param>
747 /// <param name="attribute">The attribute containing the value to get.</param>
720 - /// <param name="messageHandler">A delegate that receives error messages.</param>
748 /// <returns>The attribute's YesNoType value.</returns>
749 internal static YesNoType GetAttributeYesNoValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute)
750 {
@@ -833,6 +860,7 @@ namespace WixToolset.Core
860 /// <summary>
861 /// Display an unexpected attribute error.
862 /// </summary>
863 + /// <param name="messaging"></param>
864 /// <param name="sourceLineNumbers">Source line information about the owner element.</param>
865 /// <param name="attribute">The attribute.</param>
866 public static void UnexpectedAttribute(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute)
@@ -848,6 +876,7 @@ namespace WixToolset.Core
876 /// <summary>
877 /// Display an unsupported extension attribute error.
878 /// </summary>
879 + /// <param name="messaging"></param>
880 /// <param name="sourceLineNumbers">Source line information about the owner element.</param>
881 /// <param name="extensionAttribute">The extension attribute.</param>
882 internal static void UnsupportedExtensionAttribute(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute extensionAttribute)
src/WixToolset.Core/Compiler.cs
+8 -2
@@ -886,7 +886,7 @@ namespace WixToolset.Core
886 /// Parses an instance element.
887 /// </summary>
888 /// <param name="node">Element to parse.</param>
889 - /// <param name="componentId">Identifier of instance property.</param>
889 + /// <param name="propertyId">Identifier of instance property.</param>
890 private void ParseInstanceElement(XElement node, string propertyId)
891 {
892 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -1641,6 +1641,7 @@ namespace WixToolset.Core
1641 /// Parses a product search element.
1642 /// </summary>
1643 /// <param name="node">Element to parse.</param>
1644 + /// <param name="propertyId"></param>
1645 /// <returns>Signature for search element.</returns>
1646 private void ParseProductSearchElement(XElement node, string propertyId)
1647 {
@@ -2570,6 +2571,8 @@ namespace WixToolset.Core
2571 /// Parses a component group element.
2572 /// </summary>
2573 /// <param name="node">Element to parse.</param>
2574 + /// <param name="parentType"></param>
2575 + /// <param name="parentId"></param>
2576 [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
2577 private void ParseComponentGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId)
2578 {
@@ -5024,6 +5027,8 @@ namespace WixToolset.Core
5027 /// Parses a feature group element.
5028 /// </summary>
5029 /// <param name="node">Element to parse.</param>
5030 + /// <param name="parentType"></param>
5031 + /// <param name="parentId"></param>
5032 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
5033 private void ParseFeatureGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId)
5034 {
@@ -5477,6 +5482,7 @@ namespace WixToolset.Core
5482 /// <param name="sourcePath">Default source path of parent directory.</param>
5483 /// <param name="possibleKeyPath">This will be set with the possible keyPath for the parent component.</param>
5484 /// <param name="win64Component">true if the component is 64-bit.</param>
5485 + /// <param name="componentGuid"></param>
5486 /// <returns>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.</returns>
5487 [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
5488 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
6940 /// Parses a MajorUpgrade element.
6941 /// </summary>
6942 /// <param name="node">The element to parse.</param>
6937 - /// <param name="parentElement">The parent element.</param>
6943 + /// <param name="contextValues">The current context.</param>
6944 private void ParseMajorUpgradeElement(XElement node, IDictionary<string, string> contextValues)
6945 {
6946 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
src/WixToolset.Core/CompilerCore.cs
+7 -3
@@ -127,6 +127,8 @@ namespace WixToolset.Core
127 /// Constructor for all compiler core.
128 /// </summary>
129 /// <param name="intermediate">The Intermediate object representing compiled source document.</param>
130 + /// <param name="messaging"></param>
131 + /// <param name="parseHelper"></param>
132 /// <param name="extensions">The WiX extensions collection.</param>
133 internal CompilerCore(Intermediate intermediate, IMessaging messaging, IParseHelper parseHelper, Dictionary<XNamespace, ICompilerExtension> extensions)
134 {
@@ -531,7 +533,7 @@ namespace WixToolset.Core
533 /// </summary>
534 /// <param name="sourceLineNumbers">Source line information about the owner element.</param>
535 /// <param name="attribute">The attribute containing the value to get.</param>
534 - /// <param name="onlyAscii">Whether to allow Unicode (UCS) or UTF code pages.</param>
536 + /// <param name="onlyAnsi">Whether to allow Unicode (UCS) or UTF code pages.</param>
537 /// <returns>A valid code page integer value or variable expression.</returns>
538 [SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes")]
539 public string GetAttributeLocalizableCodePageValue(SourceLineNumber sourceLineNumbers, XAttribute attribute, bool onlyAnsi = false)
@@ -892,7 +894,7 @@ namespace WixToolset.Core
894 /// <summary>
895 /// Create an identifier based on passed file name
896 /// </summary>
895 - /// <param name="name">File name to generate identifer from</param>
897 + /// <param name="filename">File name to generate identifer from</param>
898 /// <returns></returns>
899 public Identifier CreateIdentifierFromFilename(string filename)
900 {
@@ -935,7 +937,7 @@ namespace WixToolset.Core
937 /// </summary>
938 /// <param name="parentElement">Element containing element to be parsed.</param>
939 /// <param name="element">Element to be parsed.</param>
938 - /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
940 + /// <param name="context">Extra information about the context in which this element is being parsed.</param>
941 public IComponentKeyPath ParsePossibleKeyPathExtensionElement(XElement parentElement, XElement element, IDictionary<string, string> context)
942 {
943 return this.parseHelper.ParsePossibleKeyPathExtensionElement(this.extensions.Values, this.intermediate, this.ActiveSection, parentElement, element, context);
@@ -1017,6 +1019,7 @@ namespace WixToolset.Core
1019 /// <param name="id">Unique identifier for the section.</param>
1020 /// <param name="type">Type of section to create.</param>
1021 /// <param name="codepage">Codepage for the resulting database for this ection.</param>
1022 + /// <param name="compilationId"></param>
1023 /// <returns>New section.</returns>
1024 internal IntermediateSection CreateActiveSection(string id, SectionType type, int codepage, string compilationId)
1025 {
@@ -1034,6 +1037,7 @@ namespace WixToolset.Core
1037 /// <param name="id">Unique identifier for the section.</param>
1038 /// <param name="type">Type of section to create.</param>
1039 /// <param name="codepage">Codepage for the resulting database for this ection.</param>
1040 + /// <param name="compilationId"></param>
1041 /// <returns>New section.</returns>
1042 internal IntermediateSection CreateSection(string id, SectionType type, int codepage, string compilationId)
1043 {
src/WixToolset.Core/Compiler_2.cs
+6 -2
@@ -770,8 +770,10 @@ namespace WixToolset.Core
770 /// Parses a package element.
771 /// </summary>
772 /// <param name="node">Element to parse.</param>
773 - /// <param name="productAuthor">Default package author.</param>
774 - /// <param name="moduleId">The module guid - this is necessary until Module/@Guid is removed.</param>
773 + /// <param name="isCodepageSet"></param>
774 + /// <param name="isPackageNameSet"></param>
775 + /// <param name="isKeywordsSet"></param>
776 + /// <param name="isPackageAuthorSet"></param>
777 private void ParseSummaryInformationElement(XElement node, ref bool isCodepageSet, ref bool isPackageNameSet, ref bool isKeywordsSet, ref bool isPackageAuthorSet)
778 {
779 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -3433,6 +3435,7 @@ namespace WixToolset.Core
3435 /// </summary>
3436 /// <param name="node">Element to parse.</param>
3437 /// <param name="componentId">Identifier of parent component.</param>
3438 + /// <param name="win64Component"></param>
3439 private void ParseServiceInstallElement(XElement node, string componentId, bool win64Component)
3440 {
3441 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -4266,6 +4269,7 @@ namespace WixToolset.Core
4269 /// Parses a shortcut property element.
4270 /// </summary>
4271 /// <param name="node">Element to parse.</param>
4272 + /// <param name="shortcutId"></param>
4273 private void ParseShortcutPropertyElement(XElement node, string shortcutId)
4274 {
4275 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
src/WixToolset.Core/Compiler_Bundle.cs
+30 -5
@@ -436,6 +436,7 @@ namespace WixToolset.Core
436 /// Parse a Container element.
437 /// </summary>
438 /// <param name="node">Element to parse</param>
439 + /// <param name="fileSystemSafeBundleName"></param>
440 private string ParseLogElement(XElement node, string fileSystemSafeBundleName)
441 {
442 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -706,6 +707,8 @@ namespace WixToolset.Core
707 /// Parse the BoostrapperApplication element.
708 /// </summary>
709 /// <param name="node">Element to parse</param>
710 + /// <param name="previousType"></param>
711 + /// <param name="previousId"></param>
712 private Identifier ParseBootstrapperApplicationDllElement(XElement node, ComplexReferenceChildType previousType, Identifier previousId)
713 {
714 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -1308,6 +1311,8 @@ namespace WixToolset.Core
1311 /// <param name="node">Element to parse</param>
1312 /// <param name="parentType">ComplexReferenceParentType of parent element. (BA or PayloadGroup)</param>
1313 /// <param name="parentId">Identifier of parent element.</param>
1314 + /// <param name="previousType"></param>
1315 + /// <param name="previousId"></param>
1316 private Identifier ParsePayloadElement(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId)
1317 {
1318 Debug.Assert(ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType);
@@ -1345,6 +1350,10 @@ namespace WixToolset.Core
1350 /// <param name="node">Element to parse</param>
1351 /// <param name="parentType">ComplexReferenceParentType of parent element.</param>
1352 /// <param name="parentId">Identifier of parent element.</param>
1353 + /// <param name="previousType"></param>
1354 + /// <param name="previousId"></param>
1355 + /// <param name="required"></param>
1356 + /// <param name="id"></param>
1357 /// <returns>Whether SourceFile was specified.</returns>
1358 private bool ParsePayloadElementContent(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, bool required, out Identifier id)
1359 {
@@ -1519,9 +1528,21 @@ namespace WixToolset.Core
1528 /// <summary>
1529 /// Creates the row for a Payload.
1530 /// </summary>
1522 - /// <param name="node">Element to parse</param>
1531 + /// <param name="sourceLineNumbers"></param>
1532 + /// <param name="id"></param>
1533 + /// <param name="name"></param>
1534 + /// <param name="sourceFile"></param>
1535 + /// <param name="downloadUrl"></param>
1536 /// <param name="parentType">ComplexReferenceParentType of parent element</param>
1537 /// <param name="parentId">Identifier of parent element.</param>
1538 + /// <param name="previousType"></param>
1539 + /// <param name="previousId"></param>
1540 + /// <param name="compressed"></param>
1541 + /// <param name="enableSignatureVerification"></param>
1542 + /// <param name="displayName"></param>
1543 + /// <param name="description"></param>
1544 + /// <param name="remotePayload"></param>
1545 + /// <returns></returns>
1546 private WixBundlePayloadSymbol CreatePayloadRow(SourceLineNumber sourceLineNumbers, Identifier id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType,
1547 Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, YesNoDefaultType compressed, YesNoType enableSignatureVerification, string displayName, string description,
1548 RemotePayload remotePayload)
@@ -1640,6 +1661,8 @@ namespace WixToolset.Core
1661 /// <param name="node">Element to parse.</param>
1662 /// <param name="parentType">ComplexReferenceParentType of parent element (BA or PayloadGroup).</param>
1663 /// <param name="parentId">Identifier of parent element.</param>
1664 + /// <param name="previousType"></param>
1665 + /// <param name="previousId"></param>
1666 private Identifier ParsePayloadGroupRefElement(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId)
1667 {
1668 Debug.Assert(ComplexReferenceParentType.Layout == parentType || ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType);
@@ -2513,6 +2536,7 @@ namespace WixToolset.Core
2536 /// Parse CommandLine element.
2537 /// </summary>
2538 /// <param name="node">Element to parse</param>
2539 + /// <param name="packageId">Parent packageId</param>
2540 private void ParseCommandLineElement(XElement node, string packageId)
2541 {
2542 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -2661,7 +2685,7 @@ namespace WixToolset.Core
2685 /// <param name="node">Element to parse.</param>
2686 /// <param name="parentType">ComplexReferenceParentType of parent element (Unknown or PackageGroup).</param>
2687 /// <param name="parentId">Identifier of parent element.</param>
2664 - /// <returns>Identifier for package group element.</rereturns>
2688 + /// <returns>Identifier for package group element.</returns>
2689 private string ParsePackageGroupRefElement(XElement node, ComplexReferenceParentType parentType, string parentId)
2690 {
2691 return this.ParsePackageGroupRefElement(node, parentType, parentId, ComplexReferenceChildType.Unknown, null);
@@ -2673,9 +2697,9 @@ namespace WixToolset.Core
2697 /// <param name="node">Element to parse.</param>
2698 /// <param name="parentType">ComplexReferenceParentType of parent element (Unknown or PackageGroup).</param>
2699 /// <param name="parentId">Identifier of parent element.</param>
2676 - /// <param name="parentType">ComplexReferenceParentType of previous element (Unknown, Package, or PackageGroup).</param>
2677 - /// <param name="parentId">Identifier of parent element.</param>
2678 - /// <returns>Identifier for package group element.</rereturns>
2700 + /// <param name="previousType"></param>
2701 + /// <param name="previousId"></param>
2702 + /// <returns>Identifier for package group element.</returns>
2703 private string ParsePackageGroupRefElement(XElement node, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId)
2704 {
2705 Debug.Assert(ComplexReferenceParentType.Unknown == parentType || ComplexReferenceParentType.PackageGroup == parentType || ComplexReferenceParentType.Container == parentType);
@@ -2740,6 +2764,7 @@ namespace WixToolset.Core
2764 /// <param name="sourceLineNumbers">Source line numbers.</param>
2765 /// <param name="id">Identifier for the rollback boundary.</param>
2766 /// <param name="vital">Indicates whether the rollback boundary is vital or not.</param>
2767 + /// <param name="transaction">Indicates whether the rollback boundary will use an MSI transaction.</param>
2768 /// <param name="parentType">Type of parent group.</param>
2769 /// <param name="parentId">Identifier of parent group.</param>
2770 /// <param name="previousType">Type of previous item, if any.</param>
src/WixToolset.Core/Compiler_EmbeddedUI.cs
-1
@@ -335,7 +335,6 @@ namespace WixToolset.Core
335 /// Parses a embedded UI resource element.
336 /// </summary>
337 /// <param name="node">Element to parse.</param>
338 - /// <param name="parentId">Identifier of parent EmbeddedUI element.</param>
338 private void ParseEmbeddedUIResourceElement(XElement node)
339 {
340 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
src/WixToolset.Core/Compiler_Patch.cs
+4
@@ -319,6 +319,8 @@ namespace WixToolset.Core
319 /// Parses a PatchFamily element.
320 /// </summary>
321 /// <param name="node">The element to parse.</param>
322 + /// <param name="parentType"></param>
323 + /// <param name="parentId"></param>
324 private void ParsePatchFamilyElement(XElement node, ComplexReferenceParentType parentType, string parentId)
325 {
326 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
@@ -444,6 +446,8 @@ namespace WixToolset.Core
446 /// Parses a PatchFamilyGroup element.
447 /// </summary>
448 /// <param name="node">Element to parse.</param>
449 + /// <param name="parentType"></param>
450 + /// <param name="parentId"></param>
451 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
452 private void ParsePatchFamilyGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId)
453 {
src/WixToolset.Core/Compiler_UI.cs
+1 -2
@@ -1049,12 +1049,11 @@ namespace WixToolset.Core
1049 /// </summary>
1050 /// <param name="node">Element to parse.</param>
1051 /// <param name="dialog">Identifier for parent dialog.</param>
1052 - /// <param name="table">Table control belongs in.</param>
1052 + /// <param name="symbolType">Table control belongs in.</param>
1053 /// <param name="lastTabSymbol">Last control in the tab order.</param>
1054 /// <param name="firstControl">Name of the first control in the tab order.</param>
1055 /// <param name="defaultControl">Name of the default control.</param>
1056 /// <param name="cancelControl">Name of the candle control.</param>
1057 - /// <param name="trackDiskSpace">True if the containing dialog tracks disk space.</param>
1057 private void ParseControlElement(XElement node, string dialog, SymbolDefinitionType symbolType, ref ControlSymbol lastTabSymbol, ref string firstControl, ref string defaultControl, ref string cancelControl)
1058 {
1059 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
-32
@@ -149,12 +149,6 @@ namespace WixToolset.Core.ExtensibilityServices
149 return suffix == null ? null : name + suffix;
150 }
151
152 - [Obsolete]
153 - public Identifier CreateRegistryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
154 - {
155 - return this.CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, escapeLeadingHash);
156 - }
157 -
152 public Identifier CreateRegistrySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
153 {
154 if (RegistryRootType.Unknown == root)
@@ -220,12 +214,6 @@ namespace WixToolset.Core.ExtensibilityServices
214 this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKeys);
215 }
216
223 - [Obsolete]
224 - public void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
225 - {
226 - this.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId);
227 - }
228 -
217 public void CreateWixGroupSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
218 {
219 if (null == parentId || ComplexReferenceParentType.Unknown == parentType)
@@ -284,18 +272,6 @@ namespace WixToolset.Core.ExtensibilityServices
272 });
273 }
274
287 - [Obsolete]
288 - public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null)
289 - {
290 - return this.CreateSymbol(section, sourceLineNumbers, tableName, identifier);
291 - }
292 -
293 - [Obsolete]
294 - public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null)
295 - {
296 - return this.CreateSymbol(section, sourceLineNumbers, symbolType, identifier);
297 - }
298 -
275 public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, Identifier identifier = null)
276 {
277 if (this.Creator == null)
@@ -311,14 +287,6 @@ namespace WixToolset.Core.ExtensibilityServices
287 return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier);
288 }
289
314 - [Obsolete]
315 - public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null)
316 - {
317 - var symbolDefinition = SymbolDefinitions.ByType(symbolType);
318 -
319 - return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier);
320 - }
321 -
290 public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, Identifier identifier = null)
291 {
292 return section.AddSymbol(symbolDefinition.CreateSymbol(sourceLineNumbers, identifier));
src/WixToolset.Core/ExtensibilityServices/Uuid.cs
-1
@@ -17,7 +17,6 @@ namespace WixToolset.Core.ExtensibilityServices
17 /// </summary>
18 /// <param name="namespaceGuid">The namespace UUID.</param>
19 /// <param name="value">The value.</param>
20 - /// <param name="backwardsCompatible">Flag to say to use MD5 instead of better SHA1.</param>
20 /// <returns>The UUID for the given namespace and value.</returns>
21 public static Guid NewUuid(Guid namespaceGuid, string value)
22 {
src/WixToolset.Core/IBinder.cs
+1 -1
@@ -4,7 +4,7 @@ namespace WixToolset.Core
4 {
5 using WixToolset.Extensibility.Data;
6
7 - public interface IBinder
7 + internal interface IBinder
8 {
9 IBindResult Bind(IBindContext context);
10 }
src/WixToolset.Core/ICompiler.cs
+2 -2
@@ -1,11 +1,11 @@
1 -// 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.
1 +// 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.
2
3 namespace WixToolset.Core
4 {
5 using WixToolset.Data;
6 using WixToolset.Extensibility.Data;
7
8 - public interface ICompiler
8 + internal interface ICompiler
9 {
10 Intermediate Compile(ICompileContext context);
11 }
src/WixToolset.Core/IDecompiler.cs
+1 -1
@@ -4,7 +4,7 @@ namespace WixToolset.Core
4 {
5 using WixToolset.Extensibility.Data;
6
7 - public interface IDecompiler
7 + internal interface IDecompiler
8 {
9 IDecompileResult Decompile(IDecompileContext context);
10 }
src/WixToolset.Core/ILayoutCreator.cs
+2 -2
@@ -1,10 +1,10 @@
1 -// 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.
1 +// 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.
2
3 namespace WixToolset.Core
4 {
5 using WixToolset.Extensibility.Data;
6
7 - public interface ILayoutCreator
7 + internal interface ILayoutCreator
8 {
9 void Layout(ILayoutContext context);
10 }
src/WixToolset.Core/ILibrarian.cs
+2 -2
@@ -1,11 +1,11 @@
1 -// 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.
1 +// 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.
2
3 namespace WixToolset.Core
4 {
5 using WixToolset.Data;
6 using WixToolset.Extensibility.Data;
7
8 - public interface ILibrarian
8 + internal interface ILibrarian
9 {
10 Intermediate Combine(ILibraryContext context);
11 }
src/WixToolset.Core/ILinker.cs
+2 -1
@@ -1,10 +1,11 @@
1 -// 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.
1 +// 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.
2
3 namespace WixToolset.Core
4 {
5 using WixToolset.Data;
6 using WixToolset.Extensibility.Data;
7
8 +#pragma warning disable 1591 // TODO: add documentation, move into Extensibility
9 public interface ILinker
10 {
11 Intermediate Link(ILinkContext context);
src/WixToolset.Core/IPreprocessor.cs
+1
@@ -5,6 +5,7 @@ namespace WixToolset.Core
5 using System.Xml;
6 using WixToolset.Extensibility.Data;
7
8 +#pragma warning disable 1591 // TODO: add documentation, move into Extensibility
9 public interface IPreprocessor
10 {
11 IPreprocessResult Preprocess(IPreprocessContext context);
src/WixToolset.Core/IResolver.cs
+1 -1
@@ -4,7 +4,7 @@ namespace WixToolset.Core
4 {
5 using WixToolset.Extensibility.Data;
6
7 - public interface IResolver
7 + internal interface IResolver
8 {
9 IResolveResult Resolve(IResolveContext context);
10 }
src/WixToolset.Core/Inscriber.cs
+4 -4
@@ -10,10 +10,10 @@ namespace WixToolset.Core
10 /// </summary>
11 internal class Inscriber
12 {
13 - /// <summary>
14 - /// Gets or sets the temp files collection.
15 - /// </summary>
16 - /// <value>The temp files collection.</value>
13 + // <summary>
14 + // Gets or sets the temp files collection.
15 + // </summary>
16 + // <value>The temp files collection.</value>
17 // public TempFileCollection TempFiles
18 // {
19 // get { return this.tempFiles; }
src/WixToolset.Core/LayoutCreator.cs
+3 -3
@@ -85,7 +85,7 @@ namespace WixToolset.Core
85 /// Writes the paths to the content files to a text file.
86 /// </summary>
87 /// <param name="path">Path to write file.</param>
88 - /// <param name="contentFilePaths">Collection of paths to content files that will be written to file.</param>
88 + /// <param name="trackedFiles">Collection of paths to content files that will be written to file.</param>
89 private void CreateContentsFile(string path, IEnumerable<ITrackedFile> trackedFiles)
90 {
91 var uniqueInputFilePaths = new SortedSet<string>(trackedFiles.Where(t => t.Type == TrackedFileType.Input).Select(t => t.Path), StringComparer.OrdinalIgnoreCase);
@@ -111,7 +111,7 @@ namespace WixToolset.Core
111 /// Writes the paths to the output files to a text file.
112 /// </summary>
113 /// <param name="path">Path to write file.</param>
114 - /// <param name="fileTransfers">Collection of files that were transferred to the output directory.</param>
114 + /// <param name="trackedFiles">Collection of files that were transferred to the output directory.</param>
115 private void CreateOutputsFile(string path, IEnumerable<ITrackedFile> trackedFiles)
116 {
117 var uniqueOutputPaths = new SortedSet<string>(trackedFiles.Where(t => t.Clean).Select(t => t.Path), StringComparer.OrdinalIgnoreCase);
@@ -142,7 +142,7 @@ namespace WixToolset.Core
142 /// Writes the paths to the built output files to a text file.
143 /// </summary>
144 /// <param name="path">Path to write file.</param>
145 - /// <param name="fileTransfers">Collection of files that were transferred to the output directory.</param>
145 + /// <param name="trackedFiles">Collection of files that were transferred to the output directory.</param>
146 private void CreateBuiltOutputsFile(string path, IEnumerable<ITrackedFile> trackedFiles)
147 {
148 var uniqueBuiltPaths = new SortedSet<string>(trackedFiles.Where(t => t.Type == TrackedFileType.Final).Select(t => t.Path), StringComparer.OrdinalIgnoreCase);
src/WixToolset.Core/Link/SymbolWithSection.cs
+1
@@ -18,6 +18,7 @@ namespace WixToolset.Core.Link
18 /// <summary>
19 /// Creates a symbol for a symbol.
20 /// </summary>
21 + /// <param name="section"></param>
22 /// <param name="symbol">Symbol for the symbol</param>
23 public SymbolWithSection(IntermediateSection section, IntermediateSymbol symbol)
24 {
src/WixToolset.Core/Link/WixComplexReferenceSymbolExtensions.cs
+4 -2
@@ -1,4 +1,4 @@
1 -// 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.
1 +// 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.
2
3 namespace WixToolset.Core.Link
4 {
@@ -27,7 +27,8 @@ namespace WixToolset.Core.Link
27 /// <summary>
28 /// Compares two complex references without considering the primary bit.
29 /// </summary>
30 - /// <param name="obj">Complex reference to compare to.</param>
30 + /// <param name="symbol">this</param>
31 + /// <param name="other">Complex reference to compare to.</param>
32 /// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns>
33 public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol other)
34 {
@@ -57,6 +58,7 @@ namespace WixToolset.Core.Link
58 /// <summary>
59 /// Changes all of the parent references to point to the passed in parent reference.
60 /// </summary>
61 + /// <param name="symbol">this</param>
62 /// <param name="parent">New parent complex reference.</param>
63 public static void Reparent(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol parent)
64 {
src/WixToolset.Core/Link/WixGroupingOrdering.cs
+2 -4
@@ -29,10 +29,8 @@ namespace WixToolset.Core.Link
29 /// <summary>
30 /// Creates a WixGroupingOrdering object.
31 /// </summary>
32 - /// <param name="output">Output from which to read the group and order information.</param>
32 + /// <param name="entrySections">Output from which to read the group and order information.</param>
33 /// <param name="messageHandler">Handler for any error messages.</param>
34 - /// <param name="groupTypes">Group types to include.</param>
35 - /// <param name="itemTypes">Item types to include.</param>
34 public WixGroupingOrdering(IntermediateSection entrySections, IMessaging messageHandler)
35 {
36 this.EntrySection = entrySections;
@@ -582,7 +580,7 @@ namespace WixToolset.Core.Link
580 /// <summary>
581 /// Adds an item to the 'after' ordering collection.
582 /// </summary>
585 - /// <param name="item">Items to add.</param>
583 + /// <param name="after">Item to add.</param>
584 /// <param name="messageHandler">Message handler in case a circular ordering reference is found.</param>
585 public void AddAfter(Item after, IMessaging messageHandler)
586 {
src/WixToolset.Core/Linker.cs
+1 -1
@@ -1219,7 +1219,7 @@ namespace WixToolset.Core
1219 /// <summary>
1220 /// Flattens the tables used in a Bundle.
1221 /// </summary>
1222 - /// <param name="output">Output containing the tables to process.</param>
1222 + /// <param name="entrySection">Output containing the tables to process.</param>
1223 private void FlattenBundleTables(IntermediateSection entrySection)
1224 {
1225 if (SectionType.Bundle != entrySection.Type)
src/WixToolset.Core/LocalizationParser.cs
+5
@@ -63,6 +63,7 @@ namespace WixToolset.Core
63 /// <summary>
64 /// Adds a WixVariableRow to a dictionary while performing the expected override checks.
65 /// </summary>
66 + /// <param name="messaging"></param>
67 /// <param name="variables">Dictionary of variable rows.</param>
68 /// <param name="wixVariableRow">Row to add to the variables dictionary.</param>
69 private static void AddWixVariable(IMessaging messaging, IDictionary<string, BindVariable> variables, BindVariable wixVariableRow)
@@ -80,6 +81,7 @@ namespace WixToolset.Core
81 /// <summary>
82 /// Parses the WixLocalization element.
83 /// </summary>
84 + /// <param name="messaging"></param>
85 /// <param name="node">Element to parse.</param>
86 private static Localization ParseWixLocalizationElement(IMessaging messaging, XElement node)
87 {
@@ -147,7 +149,9 @@ namespace WixToolset.Core
149 /// <summary>
150 /// Parse a localization string into a WixVariableRow.
151 /// </summary>
152 + /// <param name="messaging"></param>
153 /// <param name="node">Element to parse.</param>
154 + /// <param name="variables"></param>
155 private static void ParseString(IMessaging messaging, XElement node, IDictionary<string, BindVariable> variables)
156 {
157 string id = null;
@@ -208,6 +212,7 @@ namespace WixToolset.Core
212 /// <summary>
213 /// Parse a localized control.
214 /// </summary>
215 + /// <param name="messaging"></param>
216 /// <param name="node">Element to parse.</param>
217 /// <param name="localizedControls">Dictionary of localized controls.</param>
218 private static void ParseUI(IMessaging messaging, XElement node, IDictionary<string, LocalizedControl> localizedControls)
src/WixToolset.Core/PatchSymbolFlagsType.cs
+23 -8
@@ -1,19 +1,34 @@
1 -// 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.
1 +// 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.
2
3 namespace WixToolset.Core
4 {
5 using System;
6
7 - //
8 - // The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags:
9 - //
7 + /// <summary>
8 + /// The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags:
9 + /// </summary>
10 [Flags]
11 public enum PatchSymbolFlagsType : uint
12 {
13 - PATCH_SYMBOL_NO_IMAGEHLP = 0x00000001, // don't use imagehlp.dll
14 - PATCH_SYMBOL_NO_FAILURES = 0x00000002, // don't fail patch due to imagehlp failures
15 - PATCH_SYMBOL_UNDECORATED_TOO = 0x00000004, // after matching decorated symbols, try to match remaining by undecorated names
16 - PATCH_SYMBOL_RESERVED1 = 0x80000000, // (used internally)
13 + /// <summary>
14 + /// don't use imagehlp.dll
15 + /// </summary>
16 + PATCH_SYMBOL_NO_IMAGEHLP = 0x00000001,
17 + /// <summary>
18 + /// don't fail patch due to imagehlp failures
19 + /// </summary>
20 + PATCH_SYMBOL_NO_FAILURES = 0x00000002,
21 + /// <summary>
22 + /// after matching decorated symbols, try to match remaining by undecorated names
23 + /// </summary>
24 + PATCH_SYMBOL_UNDECORATED_TOO = 0x00000004,
25 + /// <summary>
26 + /// (used internally)
27 + /// </summary>
28 + PATCH_SYMBOL_RESERVED1 = 0x80000000,
29 + /// <summary>
30 + ///
31 + /// </summary>
32 MaxValue = PATCH_SYMBOL_NO_IMAGEHLP | PATCH_SYMBOL_NO_FAILURES | PATCH_SYMBOL_UNDECORATED_TOO
33 }
34 }
src/WixToolset.Core/Preprocess/IfDefEventHandler.cs
+2 -2
@@ -5,9 +5,9 @@ namespace WixToolset.Core.Preprocess
5 using System;
6 using WixToolset.Data;
7
8 - public delegate void IfDefEventHandler(object sender, IfDefEventArgs e);
8 + internal delegate void IfDefEventHandler(object sender, IfDefEventArgs e);
9
10 - public class IfDefEventArgs : EventArgs
10 + internal class IfDefEventArgs : EventArgs
11 {
12 public IfDefEventArgs(SourceLineNumber sourceLineNumbers, bool isIfDef, bool isDefined, string variableName)
13 {
src/WixToolset.Core/Preprocess/IncludedFileEventHandler.cs
+3 -3
@@ -9,13 +9,13 @@ namespace WixToolset.Core.Preprocess
9 /// Included file event handler delegate.
10 /// </summary>
11 /// <param name="sender">Sender of the message.</param>
12 - /// <param name="ea">Arguments for the included file event.</param>
13 - public delegate void IncludedFileEventHandler(object sender, IncludedFileEventArgs e);
12 + /// <param name="e">Arguments for the included file event.</param>
13 + internal delegate void IncludedFileEventHandler(object sender, IncludedFileEventArgs e);
14
15 /// <summary>
16 /// Event args for included file event.
17 /// </summary>
18 - public class IncludedFileEventArgs : EventArgs
18 + internal class IncludedFileEventArgs : EventArgs
19 {
20 /// <summary>
21 /// Creates a new IncludedFileEventArgs.
src/WixToolset.Core/Preprocess/ProcessedStreamEventHandler.cs
+3 -3
@@ -9,13 +9,13 @@ namespace WixToolset.Core.Preprocess
9 /// Preprocessed output stream event handler delegate.
10 /// </summary>
11 /// <param name="sender">Sender of the message.</param>
12 - /// <param name="ea">Arguments for the preprocessed stream event.</param>
13 - public delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e);
12 + /// <param name="e">Arguments for the preprocessed stream event.</param>
13 + internal delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e);
14
15 /// <summary>
16 /// Event args for preprocessed stream event.
17 /// </summary>
18 - public class ProcessedStreamEventArgs : EventArgs
18 + internal class ProcessedStreamEventArgs : EventArgs
19 {
20 /// <summary>
21 /// Creates a new ProcessedStreamEventArgs.
src/WixToolset.Core/Preprocess/ResolvedVariableEventHandler.cs
+2 -2
@@ -5,9 +5,9 @@ namespace WixToolset.Core.Preprocess
5 using System;
6 using WixToolset.Data;
7
8 - public delegate void ResolvedVariableEventHandler(object sender, ResolvedVariableEventArgs e);
8 + internal delegate void ResolvedVariableEventHandler(object sender, ResolvedVariableEventArgs e);
9
10 - public class ResolvedVariableEventArgs : EventArgs
10 + internal class ResolvedVariableEventArgs : EventArgs
11 {
12 public ResolvedVariableEventArgs(SourceLineNumber sourceLineNumbers, string variableName, string variableValue)
13 {
src/WixToolset.Core/PreprocessResult.cs
+1 -1
@@ -6,7 +6,7 @@ namespace WixToolset.Core
6 using System.Xml.Linq;
7 using WixToolset.Extensibility.Data;
8
9 - public class PreprocessResult : IPreprocessResult
9 + internal class PreprocessResult : IPreprocessResult
10 {
11 public XDocument Document { get; set; }
12
src/WixToolset.Core/Preprocessor.cs
+25 -5
@@ -63,10 +63,10 @@ namespace WixToolset.Core
63 /// </summary>
64 public event ProcessedStreamEventHandler ProcessedStream;
65
66 - /// <summary>
67 - /// Event for resolved variables.
68 - /// </summary>
69 - /// TOOD: Remove?
66 + // <summary>
67 + // Event for resolved variables.
68 + // </summary>
69 + // TOOD: Remove?
70 //public event ResolvedVariableEventHandler ResolvedVariable;
71
72 /// <summary>
@@ -134,7 +134,7 @@ namespace WixToolset.Core
134 /// <summary>
135 /// Preprocesses a file.
136 /// </summary>
137 - /// <param name="context">The preprocessing context.</param>
137 + /// <param name="state">The preprocessing context.</param>
138 /// <param name="reader">XmlReader to processing the context.</param>
139 /// <returns>XDocument with the postprocessed data.</returns>
140 private IPreprocessResult Process(ProcessingState state, XmlReader reader)
@@ -266,6 +266,7 @@ namespace WixToolset.Core
266 /// <summary>
267 /// Processes an xml reader into an xml writer.
268 /// </summary>
269 + /// <param name="state"></param>
270 /// <param name="include">Specifies if reader is from an included file.</param>
271 /// <param name="reader">Reader for the source document.</param>
272 /// <param name="container">Node where content should be added.</param>
@@ -546,6 +547,7 @@ namespace WixToolset.Core
547 /// <summary>
548 /// Processes an error processing instruction.
549 /// </summary>
550 + /// <param name="state"></param>
551 /// <param name="errorMessage">Text from source.</param>
552 private void PreprocessError(ProcessingState state, string errorMessage)
553 {
@@ -558,6 +560,7 @@ namespace WixToolset.Core
560 /// <summary>
561 /// Processes a warning processing instruction.
562 /// </summary>
563 + /// <param name="state"></param>
564 /// <param name="warningMessage">Text from source.</param>
565 private void PreprocessWarning(ProcessingState state, string warningMessage)
566 {
@@ -570,6 +573,7 @@ namespace WixToolset.Core
573 /// <summary>
574 /// Processes a define processing instruction and creates the appropriate parameter.
575 /// </summary>
576 + /// <param name="state"></param>
577 /// <param name="originalDefine">Text from source.</param>
578 private void PreprocessDefine(ProcessingState state, string originalDefine)
579 {
@@ -607,6 +611,7 @@ namespace WixToolset.Core
611 /// <summary>
612 /// Processes an undef processing instruction and creates the appropriate parameter.
613 /// </summary>
614 + /// <param name="state"></param>
615 /// <param name="originalDefine">Text from source.</param>
616 private void PreprocessUndef(ProcessingState state, string originalDefine)
617 {
@@ -625,6 +630,7 @@ namespace WixToolset.Core
630 /// <summary>
631 /// Processes an included file.
632 /// </summary>
633 + /// <param name="state"></param>
634 /// <param name="includePath">Path to included file.</param>
635 /// <param name="parent">Parent container for included content.</param>
636 private void PreprocessInclude(ProcessingState state, string includePath, XContainer parent)
@@ -671,6 +677,7 @@ namespace WixToolset.Core
677 /// <summary>
678 /// Preprocess a foreach processing instruction.
679 /// </summary>
680 + /// <param name="state"></param>
681 /// <param name="reader">The xml reader.</param>
682 /// <param name="container">The container where to output processed data.</param>
683 /// <param name="offset">Offset for the line numbers.</param>
@@ -785,7 +792,9 @@ namespace WixToolset.Core
792 /// <summary>
793 /// Processes a pragma processing instruction
794 /// </summary>
795 + /// <param name="state"></param>
796 /// <param name="pragmaText">Text from source.</param>
797 + /// <param name="parent"></param>
798 private void PreprocessPragma(ProcessingState state, string pragmaText, XContainer parent)
799 {
800 var match = PragmaRegex.Match(pragmaText);
@@ -811,6 +820,7 @@ namespace WixToolset.Core
820 /// <summary>
821 /// Gets the next token in an expression.
822 /// </summary>
823 + /// <param name="state"></param>
824 /// <param name="originalExpression">Expression to parse.</param>
825 /// <param name="expression">Expression with token removed.</param>
826 /// <param name="stringLiteral">Flag if token is a string literal instead of a variable.</param>
@@ -958,6 +968,7 @@ namespace WixToolset.Core
968 /// <summary>
969 /// Gets the value for a variable.
970 /// </summary>
971 + /// <param name="state"></param>
972 /// <param name="originalExpression">Original expression for error message.</param>
973 /// <param name="variable">Variable to evaluate.</param>
974 /// <returns>Value of variable.</returns>
@@ -996,6 +1007,7 @@ namespace WixToolset.Core
1007 /// <summary>
1008 /// Gets the left side value, operator, and right side value of an expression.
1009 /// </summary>
1010 + /// <param name="state"></param>
1011 /// <param name="originalExpression">Original expression to evaluate.</param>
1012 /// <param name="expression">Expression modified while processing.</param>
1013 /// <param name="leftValue">Left side value from expression.</param>
@@ -1048,6 +1060,7 @@ namespace WixToolset.Core
1060 /// <summary>
1061 /// Evaluates an expression.
1062 /// </summary>
1063 + /// <param name="state"></param>
1064 /// <param name="originalExpression">Original expression to evaluate.</param>
1065 /// <param name="expression">Expression modified while processing.</param>
1066 /// <returns>true if expression evaluates to true.</returns>
@@ -1143,6 +1156,7 @@ namespace WixToolset.Core
1156 /// <summary>
1157 /// Gets a sub-expression in parenthesis.
1158 /// </summary>
1159 + /// <param name="state"></param>
1160 /// <param name="originalExpression">Original expression to evaluate.</param>
1161 /// <param name="expression">Expression modified while processing.</param>
1162 /// <param name="endSubExpression">Index of end of sub-expression.</param>
@@ -1197,6 +1211,7 @@ namespace WixToolset.Core
1211 /// <summary>
1212 /// Updates expression based on operation.
1213 /// </summary>
1214 + /// <param name="state"></param>
1215 /// <param name="currentValue">State to update.</param>
1216 /// <param name="operation">Operation to apply to current value.</param>
1217 /// <param name="prevResult">Previous result.</param>
@@ -1221,6 +1236,7 @@ namespace WixToolset.Core
1236 /// <summary>
1237 /// Evaluate an expression.
1238 /// </summary>
1239 + /// <param name="state"></param>
1240 /// <param name="expression">Expression to evaluate.</param>
1241 /// <returns>Boolean result of expression.</returns>
1242 private bool EvaluateExpression(ProcessingState state, string expression)
@@ -1252,6 +1268,7 @@ namespace WixToolset.Core
1268 /// $(var.A) and $(var.B)>2 or $(var.B) &lt;= 2
1269 /// $(var.A) != "2"
1270 /// </summary>
1271 + /// <param name="state"></param>
1272 /// <param name="originalExpression">The original expression</param>
1273 /// <param name="expression">The expression currently being evaluated</param>
1274 /// <param name="prevResultOperation">The operation to apply to this result</param>
@@ -1322,6 +1339,7 @@ namespace WixToolset.Core
1339 /// <summary>
1340 /// Update the current line number with the reader's current state.
1341 /// </summary>
1342 + /// <param name="state"></param>
1343 /// <param name="reader">The xml reader for the preprocessor.</param>
1344 /// <param name="offset">This is the artificial offset of the line numbers from the reader. Used for the foreach processing.</param>
1345 private void UpdateCurrentLineNumber(ProcessingState state, XmlReader reader, int offset)
@@ -1341,6 +1359,7 @@ namespace WixToolset.Core
1359 /// <summary>
1360 /// Pushes a file name on the stack of included files.
1361 /// </summary>
1362 + /// <param name="state"></param>
1363 /// <param name="fileName">Name to push on to the stack of included files.</param>
1364 private void PushInclude(ProcessingState state, string fileName)
1365 {
@@ -1374,6 +1393,7 @@ namespace WixToolset.Core
1393 /// through the search paths in the order given on the command line
1394 /// (leftmost first, ...).
1395 /// </summary>
1396 + /// <param name="state"></param>
1397 /// <param name="includePath">User-specified path to the included file (usually just the file name).</param>
1398 /// <returns>Returns a FileInfo for the found include file, or null if the file cannot be found.</returns>
1399 private string GetIncludeFile(ProcessingState state, string includePath)
src/WixToolset.Core/ResolveFileResult.cs
+1 -1
@@ -5,7 +5,7 @@ namespace WixToolset.Core
5 using System.Collections.Generic;
6 using WixToolset.Extensibility.Data;
7
8 - public class ResolveFileResult : IResolveFileResult
8 + internal class ResolveFileResult : IResolveFileResult
9 {
10 public string Path { get; set; }
11
src/WixToolset.Core/WixToolset.Core.csproj
+2
@@ -9,6 +9,8 @@
9 <Title>WiX Toolset Core</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 + <NBGV_EmitThisAssemblyClass>true</NBGV_EmitThisAssemblyClass>
13 + <CreateDocumentationFile>true</CreateDocumentationFile>
14 </PropertyGroup>
15
16 <ItemGroup>
src/WixToolset.Core/WixToolsetServiceProviderFactory.cs
+7
@@ -4,8 +4,15 @@ namespace WixToolset.Core
4 {
5 using WixToolset.Extensibility.Services;
6
7 + /// <summary>
8 + /// Class for creating <see cref="IWixToolsetCoreServiceProvider"/>.
9 + /// </summary>
10 public static class WixToolsetServiceProviderFactory
11 {
12 + /// <summary>
13 + /// Creates a new <see cref="IWixToolsetCoreServiceProvider"/>.
14 + /// </summary>
15 + /// <returns>The created <see cref="IWixToolsetCoreServiceProvider"/></returns>
16 public static IWixToolsetCoreServiceProvider CreateServiceProvider()
17 {
18 return new WixToolsetServiceProvider();
src/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs
+4 -3
@@ -6,7 +6,6 @@ namespace WixToolsetTest.CoreIntegration
6 using System.IO;
7 using System.Linq;
8 using WixBuildTools.TestSupport;
9 - using WixToolset.Core.Burn.Bundles;
9 using WixToolset.Core.TestPackage;
10 using WixToolset.Data;
11 using WixToolset.Data.Symbols;
@@ -109,8 +108,10 @@ namespace WixToolsetTest.CoreIntegration
108
109 Assert.InRange(result.ExitCode, 2, int.MaxValue);
110
112 - Assert.Equal(1, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.IllegalRelativeLongFilename).Count());
113 - Assert.Equal(2, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.PayloadMustBeRelativeToCache).Count());
111 + var expectedIllegalRelativeLongFileName = 1;
112 + var expectedPayloadMustBeRelativeToCache = 2;
113 + Assert.Equal(expectedIllegalRelativeLongFileName, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.IllegalRelativeLongFilename).Count());
114 + Assert.Equal(expectedPayloadMustBeRelativeToCache, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.PayloadMustBeRelativeToCache).Count());
115 }
116 }
117 }
src/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj
-4
@@ -8,10 +8,6 @@
8 <DebugType>embedded</DebugType>
9 </PropertyGroup>
10
11 - <PropertyGroup>
12 - <NoWarn>NU1701</NoWarn>
13 - </PropertyGroup>
14 -
11 <ItemGroup>
12 <Content Include="TestData\.Data\burn.exe" CopyToOutputDirectory="PreserveNewest" />
13 <Content Include="TestData\AppId\Advertised.wxs" CopyToOutputDirectory="PreserveNewest" />