Translate() public method

public Translate ( ITranslationResult result, MethodCallExpression method ) : void
result ITranslationResult
method System.Linq.Expressions.MethodCallExpression
return void
        public void Translate(MethodCallExpression method, ITranslationResult result)
        {
            if (method.Method.Name != MethodName)
            {
                var message = string.Format(Resources.TranslatorMemberNotSupported, method.NodeType);
                throw new ArgumentOutOfRangeException("method", message);
            }

            var expressionTranslator = new ExpressionTranslator(_nameChanges);
            expressionTranslator.Translate(result, method);
        }
        public virtual void Translate(MethodCallExpression method, ITranslationResult result)
        {
            if (method.Method.Name != _methodName)
            {
                string message = string.Format(Resources.TranslatorMethodNotSupported, method.Method.Name);
                throw new ArgumentOutOfRangeException("method", message);
            }

            var expressionTranslator = new ExpressionTranslator(_nameChanges);

            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);
        }