Permalink
Browse files

RavenDB-5325 fixed SOE (#4465)

  • Loading branch information...
1 parent 1fd8cba commit f267c5734cd2deeb30221ea0ac6ef14e930f9f5c @ppekrol ppekrol committed on GitHub Sep 24, 2016
Showing with 15 additions and 1 deletion.
  1. +15 −1 Imports/Newtonsoft.Json/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
@@ -110,7 +110,21 @@ public static MethodInfo Method(this Delegate d)
public static MemberTypes MemberType(this MemberInfo memberInfo)
{
- return memberInfo.MemberType();
+#if !(NETFX_CORE || PORTABLE || PORTABLE40)
+ return memberInfo.MemberType;
+
+#else
+ if (memberInfo is PropertyInfo)
+ return MemberTypes.Property;
+ else if (memberInfo is FieldInfo)
+ return MemberTypes.Field;
+ else if (memberInfo is EventInfo)
+ return MemberTypes.Event;
+ else if (memberInfo is MethodInfo)
+ return MemberTypes.Method;
+ else
+ return MemberTypes.Other;
+#endif
}
public static bool ContainsGenericParameters(this Type type)

0 comments on commit f267c57

Please sign in to comment.