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.")]
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.")]
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
+#if !NO_DYNAMIC_CODEGEN
using System.Reflection.Emit;
+#endif
using System.Security;
class CodeGenerator
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"
return false;
}
+#endif
internal override bool Equals(object other, Dictionary<DataContractPairKey, object> checkedContracts)
{
{
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.")]
}
return false;
}
+#endif
}
interface IGenericNameProvider
}
}
+#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.")]
}
return false;
}
+#endif
internal DataMember BindGenericParameters(DataContract[] paramContracts, Dictionary<DataContract, DataContract> boundContracts)
{
}
#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.")]
return false;
}
+#endif
internal override bool Equals(object other, Dictionary<DataContractPairKey, object> checkedContracts)
{