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