From 0a87bdd3ea0ba538e2cd2713c071c327168e3b44 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 3 Mar 2020 17:19:41 -0500 Subject: Add CreateCustomActionReference method from IParseHelper ...to simplify creating custom action references following naming conventions. --- .../ExtensibilityServices/CustomActionPlatforms.cs | 31 ---------------------- .../ExtensibilityServices/ParseHelper.cs | 11 ++------ 2 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs (limited to 'src') diff --git a/src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs b/src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs deleted file mode 100644 index 17f381ac..00000000 --- a/src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Core.ExtensibilityServices -{ - using System; - - /// - /// Platforms supported by custom actions. - /// - [Flags] - public enum CustomActionPlatforms - { - /// Not specified. - None = 0, - - /// x86. - X86 = 0x1, - - /// x64. - X64 = 0x2, - - /// ia64. - IA64 = 0x4, - - /// arm. - ARM = 0x8, - - /// arm64. - ARM64 = 0x10 - } -} diff --git a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs index 271e5697..af42fa49 100644 --- a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs @@ -892,20 +892,13 @@ namespace WixToolset.Core.ExtensibilityServices return actionTuple; } - /// - /// Create a reference in the specified section for a custom action specialized for specific platforms, - /// given standard prefixes for naming and suffixes for platforms. - /// - /// Source line information. - /// The custom action base name. - /// The platforms for which there are specialized custom actions. - public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms) + public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform currentPlatform, CustomActionPlatforms supportedPlatforms) { if (!this.Messaging.EncounteredError) { var name = String.Concat("Wix4", customAction); - switch (platform) + switch (currentPlatform) { case Platform.X86: if ((supportedPlatforms & CustomActionPlatforms.X86) == CustomActionPlatforms.X86) -- cgit v1.2.3-55-g6feb