Disable more cas
authorMarek Safar <marek.safar@gmail.com>
Wed, 6 May 2015 14:56:28 +0000 (16:56 +0200)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:10:12 +0000 (00:10 +0200)
mcs/class/referencesource/System.Data/System/Data/XMLSchema.cs

index 476e3b77c5972435c2fae38b8352713b606e52f9..1fddd6941516144cf164d53c481b0df937bd897b 100644 (file)
@@ -24,14 +24,17 @@ namespace System.Data {
         internal static TypeConverter GetConverter(Type type) { 
             HostProtectionAttribute protAttrib = new HostProtectionAttribute();
             protAttrib.SharedState = true;
-
+#if !DISABLE_CAS_USE
             CodeAccessPermission permission = (CodeAccessPermission)protAttrib.CreatePermission();
             permission.Assert(); 
+#endif
             try {
                 return TypeDescriptor.GetConverter(type);
             }
             finally {
+#if !DISABLE_CAS_USE
                 CodeAccessPermission.RevertAssert(); 
+#endif
             }
         }