-Fixed medium trust error
This commit is contained in:
@@ -48,7 +48,15 @@ namespace Newtonsoft.Json.Utilities
|
|||||||
|
|
||||||
ConstructorInfo c = method as ConstructorInfo;
|
ConstructorInfo c = method as ConstructorInfo;
|
||||||
if (c != null)
|
if (c != null)
|
||||||
return c.Invoke;
|
{
|
||||||
|
// don't convert to method group to avoid medium trust issues
|
||||||
|
// https://github.com/JamesNK/Newtonsoft.Json/issues/476
|
||||||
|
return a =>
|
||||||
|
{
|
||||||
|
object[] args = a;
|
||||||
|
return c.Invoke(args);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return a => method.Invoke(null, a);
|
return a => method.Invoke(null, a);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user