-Added JsonDataExtensionAttribute

This commit is contained in:
James Newton-King
2013-04-30 00:13:20 +12:00
parent a7d47558d8
commit 64da81d386
17 changed files with 325 additions and 24 deletions
@@ -80,7 +80,13 @@ namespace Newtonsoft.Json.Utilities
}
if (method is MethodInfo)
callExpression = EnsureCastExpression(callExpression, type);
{
MethodInfo m = (MethodInfo)method;
if (m.ReturnType != typeof(void))
callExpression = EnsureCastExpression(callExpression, type);
else
callExpression = Expression.Block(callExpression, Expression.Constant(null));
}
LambdaExpression lambdaExpression = Expression.Lambda(typeof(MethodCall<T, object>), callExpression, targetParameterExpression, argsParameterExpression);