public Translate ( ITranslationResult result, |
||
result | ITranslationResult | |
method | ||
return | void |
public void Translate(MethodCallExpression method, ITranslationResult result) { if (method.Method.Name != MethodName) { var message = string.Format("Resources.TranslatorMemberNotSupported {0}", method.NodeType); throw new ArgumentOutOfRangeException("method", message); } var expressionTranslator = new ExpressionTranslator(_configuration); expressionTranslator.Translate(result, method); }
public virtual void Translate(MethodCallExpression method, ITranslationResult result) { if (method.Method.Name != _methodName) { string message = string.Format("Resources.TranslatorMethodNotSupported {0}", method.Method.Name); throw new ArgumentOutOfRangeException("method", message); } var expressionTranslator = new ExpressionTranslator(_configuration); MethodCallExpression targetMethod = method; if (method.Arguments.Count == 1 && method.Arguments[0].NodeType == ExpressionType.Call) { targetMethod = (MethodCallExpression)method.Arguments[0]; } expressionTranslator.Translate(result, targetMethod); expressionTranslator.AddPostProcessing(method); }