more uses of NO_DYNAMIC_CODEGEN condition were needed.
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 24 Apr 2015 06:04:12 +0000 (15:04 +0900)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:10:10 +0000 (00:10 +0200)
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ClassDataContract.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/CodeGenerator.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/CollectionDataContract.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContract.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataMember.cs
mcs/class/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlDataContract.cs

index 4c4b2d33106deeffea0550c27c5007fa9379f9fb..6e80e1071620950093a08cc1e5d466eb04a62615 100644 (file)
@@ -459,6 +459,7 @@ namespace System.Runtime.Serialization
             return o;
         }
 
+#if !NO_DYNAMIC_CODEGEN
         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - calculates whether this class requires MemberAccessPermission for deserialization."
             + "Since this information is used to determine whether to give the generated code access "
             + "permissions to private members, any changes to the logic should be reviewed.")]
@@ -663,6 +664,7 @@ namespace System.Runtime.Serialization
             return false;
 #endif
         }
+#endif
 
         [Fx.Tag.SecurityNote(Critical = "Holds all state used for (de)serializing classes."
             + " Since the data is cached statically, we lock down access to it.")]
index 8a395b349491f546ff600f8faac2b53ff95644d0..195c016ba0534489a2ecd154a053b5147b659d36 100644 (file)
@@ -9,7 +9,9 @@ namespace System.Runtime.Serialization
     using System.Diagnostics;
     using System.Globalization;
     using System.Reflection;
+#if !NO_DYNAMIC_CODEGEN
     using System.Reflection.Emit;
+#endif
     using System.Security;
 
     class CodeGenerator
index 3867dd5554dfc02beee6ac2df90e3a7191aadd41..75092529f3c07ed0564d4e7e17cd61c3dd6b5ff1 100644 (file)
@@ -1303,6 +1303,7 @@ namespace System.Runtime.Serialization
             return (InvalidCollectionInSharedContractMessage == null);
         }
 
+#if !NO_DYNAMIC_CODEGEN
         [Fx.Tag.SecurityNote(Miscellaneous =
             "RequiresReview - Calculates whether this collection requires MemberAccessPermission for deserialization."
             + " Since this information is used to determine whether to give the generated code access"
@@ -1395,6 +1396,7 @@ namespace System.Runtime.Serialization
 
             return false;
         }
+#endif
 
         internal override bool Equals(object other, Dictionary<DataContractPairKey, object> checkedContracts)
         {
index 7752e536027acb1f872ba15b7c186e02b72a807e..68d510c66635a8bc1d30f6dcb6c0c9ab53137deb 100644 (file)
@@ -2267,7 +2267,12 @@ namespace System.Runtime.Serialization
         {
             ThrowInvalidDataContractException(message, UnderlyingType);
         }
-
+#if NO_DYNAMIC_CODEGEN
+        static internal bool IsTypeVisible(Type t)
+        {
+            return true;
+        }
+#else
         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - checks type visibility to calculate if access to it requires MemberAccessPermission."
             + " Since this information is used to determine whether to give the generated code access"
             + " permissions to private members, any changes to the logic should be reviewed.")]
@@ -2404,6 +2409,7 @@ namespace System.Runtime.Serialization
             }
             return false;
         }
+#endif
     }
 
     interface IGenericNameProvider
index fa8ba1c2a75c4ccc1d12036a9e178ef20ef82348..6549bfc455a18e8fd9054f8108ab1c22f9784163 100644 (file)
@@ -265,6 +265,7 @@ namespace System.Runtime.Serialization
             }
         }
 
+#if !NO_DYNAMIC_CODEGEN
         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - checks member visibility to calculate if access to it requires MemberAccessPermission for serialization."
             + " Since this information is used to determine whether to give the generated code access"
             + " permissions to private members, any changes to the logic should be reviewed.")]
@@ -306,6 +307,7 @@ namespace System.Runtime.Serialization
             }
             return false;
         }
+#endif
 
         internal DataMember BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract> boundContracts)
         {
index 143c56b78ad21b2688a294f0d617411405fd3e8e..6782fdd30baef7b9f25e4b7c09fc585bc126403f 100644 (file)
@@ -375,6 +375,7 @@ namespace System.Runtime.Serialization
         }
 #endif
 
+#if !NO_DYNAMIC_CODEGEN
         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Calculates whether this Xml type requires MemberAccessPermission for deserialization."
             + " Since this information is used to determine whether to give the generated code access"
             + " permissions to private members, any changes to the logic should be reviewed.")]
@@ -404,6 +405,7 @@ namespace System.Runtime.Serialization
 
             return false;
         }
+#endif
 
         internal override bool Equals(object other, Dictionary<DataContractPairKey, object> checkedContracts)
         {