From d2cb5610e1812b2c4dec1785737ceab915aaa876 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Wed, 15 Jun 2016 17:59:26 -0700 Subject: [PATCH] Resurrect ArchitectureSensitiveAttribute Removal was backed out in SD:712734 --- src/System.Management.Automation/map.json | 1 + .../utils/ArchitectureSensitiveAttribute.cs | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/System.Management.Automation/utils/ArchitectureSensitiveAttribute.cs diff --git a/src/System.Management.Automation/map.json b/src/System.Management.Automation/map.json index 17e1a53709..686728edb2 100644 --- a/src/System.Management.Automation/map.json +++ b/src/System.Management.Automation/map.json @@ -472,6 +472,7 @@ "monad/src/engine/resources/Authenticode.resx": "resources/Authenticode.resx", "monad/src/engine/COM/ComUtil.cs": "engine/COM/ComUtil.cs", "monad/src/engine/hostifaces/MshHostUserInterface.cs": "engine/hostifaces/MshHostUserInterface.cs", + "monad/src/utils/ArchitectureSensitiveAttribute.cs": "utils/ArchitectureSensitiveAttribute.cs", "monad/src/engine/DriveInterfaces.cs": "engine/DriveInterfaces.cs", "monad/src/engine/ComInterop/Errors.cs": "engine/ComInterop/Errors.cs", "monad/src/singleshell/config/MshConsoleInfo.cs": "singleshell/config/MshConsoleInfo.cs", diff --git a/src/System.Management.Automation/utils/ArchitectureSensitiveAttribute.cs b/src/System.Management.Automation/utils/ArchitectureSensitiveAttribute.cs new file mode 100644 index 0000000000..9cf302f0fd --- /dev/null +++ b/src/System.Management.Automation/utils/ArchitectureSensitiveAttribute.cs @@ -0,0 +1,28 @@ +/********************************************************************++ +Copyright (c) Microsoft Corporation. All rights reserved. +--********************************************************************/ + +using System; +using System.Reflection; + +namespace System.Management.Automation.Internal +{ + /// + /// This attribute is used for Design For Testability. + /// It should be placed on any method containing code + /// which is likely to be sensitive to X86/X64/IA64 issues, + /// primarily code which calls DllImports or otherwise uses + /// NativeMethods. This allows us to generate code coverage + /// data specific to architecture sensitive code. + /// + [AttributeUsage(AttributeTargets.Method, AllowMultiple=false)] + internal class ArchitectureSensitiveAttribute : Attribute + { + /// + /// Constructor for the ArchitectureSensitiveAttribute class. + /// + internal ArchitectureSensitiveAttribute () + { + } + } +}