From: Sebastien Pouliot Date: Fri, 30 Jan 2015 00:52:58 +0000 (-0500) Subject: Disable CAS calls on System.Componentmodel.TypeDescriptor X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=f115ec6d521034aa22513fb093909ecf6bfae1fb;hp=7ad76389fbdd3ea4bd0e3c5c764c670a933e3d78;p=mono.git Disable CAS calls on System.Componentmodel.TypeDescriptor --- diff --git a/mcs/class/referencesource/System/compmod/system/componentmodel/TypeDescriptor.cs b/mcs/class/referencesource/System/compmod/system/componentmodel/TypeDescriptor.cs index 44ef7f85be6..c1e1c43b231 100644 --- a/mcs/class/referencesource/System/compmod/system/componentmodel/TypeDescriptor.cs +++ b/mcs/class/referencesource/System/compmod/system/componentmodel/TypeDescriptor.cs @@ -475,13 +475,17 @@ namespace System.ComponentModel // sense that they provide a public API while not necessarily being public themselves. As such, // we need to allow instantiation of internal TypeDescriptionProviders. See the thread attached // to VSWhidbey #500522 for a more detailed discussion. +#if !DISABLE_CAS_USE IntSecurity.FullReflection.Assert(); try { +#endif prov = (TypeDescriptionProvider)Activator.CreateInstance(providerType); +#if !DISABLE_CAS_USE } finally { CodeAccessPermission.RevertAssert(); } +#endif Trace("Providers : Default provider found : {0}", providerType.Name); AddProvider(prov, type); providerAdded = true;