Boo.Lang.Compiler.Steps.InjectCallableConversions.Adapt C# (CSharp) Метод

Adapt() приватный Метод

private Adapt ( ICallableType expected, Expression callable ) : Expression
expected ICallableType
callable Boo.Lang.Compiler.Ast.Expression
Результат Boo.Lang.Compiler.Ast.Expression
        Expression Adapt(ICallableType expected, Expression callable)
        {
            ICallableType actual = GetExpressionType(callable) as ICallableType;
            if (null == actual)
            {
                // TODO: should we adapt System.Object, System.Delegate,
                // System.MulticastDelegate and ICallable as well?
                return null;
            }
            ClassDefinition adaptor = GetAdaptor(expected, actual);
            Method adapt = (Method)adaptor.Members["Adapt"];
            return CodeBuilder.CreateMethodInvocation((IMethod)adapt.Entity, callable);
        }