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

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

private CreateDelegate ( IType type, Expression source ) : Expression
type IType
source Boo.Lang.Compiler.Ast.Expression
Результат Boo.Lang.Compiler.Ast.Expression
        Expression CreateDelegate(IType type, Expression source)
        {
            IMethod method = (IMethod)GetEntity(source);

            Expression target = null;
            if (method.IsStatic)
            {
                target = CodeBuilder.CreateNullLiteral();
            }
            else
            {
                target = ((MemberReferenceExpression)source).Target;
            }
            return CodeBuilder.CreateConstructorInvocation(GetConcreteType(type).GetConstructors()[0],
                                    target,
                                    CodeBuilder.CreateAddressOfExpression(method));
        }