Add CreateCustomActionReference method from IParseHelper
...to simplify creating custom action references following naming conventions.
Bob Arnson committed
Mar 3, 2020 at 17:19 UTC
0a87bdd3ea0ba538e2cd2713c071c327168e3b44
2 files changed
+2
-40
src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs
deleted
-31
@@ -1,31 +0,0 @@
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.ExtensibilityServices
4
-{
5
- using System;
6
-
7
- /// <summary>
8
- /// Platforms supported by custom actions.
9
- /// </summary>
10
- [Flags]
11
- public enum CustomActionPlatforms
12
- {
13
- /// <summary>Not specified.</summary>
14
- None = 0,
15
-
16
- /// <summary>x86.</summary>
17
- X86 = 0x1,
18
-
19
- /// <summary>x64.</summary>
20
- X64 = 0x2,
21
-
22
- /// <summary>ia64.</summary>
23
- IA64 = 0x4,
24
-
25
- /// <summary>arm.</summary>
26
- ARM = 0x8,
27
-
28
- /// <summary>arm64.</summary>
29
- ARM64 = 0x10
30
- }
31
-}
src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
+2
-9
@@ -892,20 +892,13 @@ namespace WixToolset.Core.ExtensibilityServices
892
return actionTuple;
893
}
894
895
- /// <summary>
896
- /// Create a reference in the specified section for a custom action specialized for specific platforms,
897
- /// given standard prefixes for naming and suffixes for platforms.
898
- /// </summary>
899
- /// <param name="sourceLineNumbers">Source line information.</param>
900
- /// <param name="customAction">The custom action base name.</param>
901
- /// <param name="supportedPlatforms">The platforms for which there are specialized custom actions.</param>
902
- public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms)
895
+ public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform currentPlatform, CustomActionPlatforms supportedPlatforms)
896
{
897
if (!this.Messaging.EncounteredError)
898
{
899
var name = String.Concat("Wix4", customAction);
900
908
- switch (platform)
901
+ switch (currentPlatform)
902
{
903
case Platform.X86:
904
if ((supportedPlatforms & CustomActionPlatforms.X86) == CustomActionPlatforms.X86)