From 997fd848c53d75890a7072ab3f55b4eb6c2e244f Mon Sep 17 00:00:00 2001 From: Rama Krishnan Raghupathy Date: Fri, 14 Oct 2016 18:01:44 -0700 Subject: [PATCH] Throwing PlatformNotSupportedException for ActivationAttributes --- src/mscorlib/src/System.Private.CoreLib.txt | 1 + src/mscorlib/src/System/Activator.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mscorlib/src/System.Private.CoreLib.txt b/src/mscorlib/src/System.Private.CoreLib.txt index 0369344..762ee45 100644 --- a/src/mscorlib/src/System.Private.CoreLib.txt +++ b/src/mscorlib/src/System.Private.CoreLib.txt @@ -1405,6 +1405,7 @@ NotSupported_SignalAndWaitSTAThread = SignalAndWait on a STA thread is not suppo NotSupported_CreateInstanceWithTypeBuilder = CreateInstance cannot be used with an object of type TypeBuilder. NotSupported_NonUrlAttrOnMBR = UrlAttribute is the only attribute supported for MarshalByRefObject. NotSupported_ActivAttrOnNonMBR = Activation Attributes are not supported for types not deriving from MarshalByRefObject. +NotSupported_ActivAttr = Activation Attributes are not supported. NotSupported_ActivForCom = Activation Attributes not supported for COM Objects. NotSupported_NoCodepageData = No data is available for encoding {0}. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. NotSupported_CodePage50229 = The ISO-2022-CN Encoding (Code page 50229) is not supported. diff --git a/src/mscorlib/src/System/Activator.cs b/src/mscorlib/src/System/Activator.cs index 274b0e7..48fedc0 100644 --- a/src/mscorlib/src/System/Activator.cs +++ b/src/mscorlib/src/System/Activator.cs @@ -93,8 +93,10 @@ namespace System { } } else -#endif throw new NotSupportedException(Environment.GetResourceString("NotSupported_ActivAttrOnNonMBR" )); +#else + throw new PlatformNotSupportedException(Environment.GetResourceString("NotSupported_ActivAttr" )); +#endif } RuntimeType rt = type.UnderlyingSystemType as RuntimeType; -- 2.7.4