Home | History | Annotate | Download | only in Reflection

Lines Matching full:expression

61             ParameterExpression parameter = Expression.Parameter(typeof(IMessage), "p");
62 Expression downcast = Expression.Convert(parameter, method.DeclaringType);
63 Expression call = Expression.Call(downcast, method);
64 Expression upcast = Expression.Convert(call, typeof(object));
65 return Expression.Lambda<Func<IMessage, object>>(upcast, parameter).Compile();
74 ParameterExpression parameter = Expression.Parameter(typeof(IMessage), "p");
75 Expression downcast = Expression.Convert(parameter, method.DeclaringType);
76 Expression call = Expression.Call(downcast, method);
77 Expression upcast = Expression.Convert(call, typeof(T));
78 return Expression.Lambda<Func<IMessage, T>>(upcast, parameter).Compile();
87 ParameterExpression targetParameter = Expression.Parameter(typeof(IMessage), "target");
88 ParameterExpression argParameter = Expression.Parameter(typeof(object), "arg");
89 Expression castTarget = Expression.Convert(targetParameter, method.DeclaringType);
90 Expression castArgument = Expression.Convert(argParameter, method.GetParameters()[0].ParameterType);
91 Expression call = Expression.Call(castTarget, method, castArgument);
92 return Expression.Lambda<Action<IMessage, object>>(call, targetParameter, argParameter).Compile();
101 ParameterExpression targetParameter = Expression.Parameter(typeof(IMessage), "target");
102 Expression castTarget = Expression.Convert(targetParameter, method.DeclaringType);
103 Expression call = Expression.Call(castTarget, method);
104 return Expression.Lambda<Action<IMessage>>(call, targetParameter).Compile();