Boo.Lang.Compiler.Steps.ProcessMethodBodies.ProcessTypeInvocation C# (CSharp) Метод

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

private ProcessTypeInvocation ( MethodInvocationExpression node ) : void
node MethodInvocationExpression
Результат void
        void ProcessTypeInvocation(MethodInvocationExpression node)
        {
            var type = (IType)node.Target.Entity;

            var callableType = type as ICallableType;
            if (callableType != null)
            {
                ProcessCallableTypeInvocation(node, callableType);
                return;
            }

            if (!AssertCanCreateInstance(node.Target, type))
            {
                Error(node);
                return;
            }

            ResolveNamedArguments(type, node.NamedArguments);
            if (type.IsValueType && node.Arguments.Count == 0)
            {
                ProcessValueTypeInstantiation(type, node);
                return;
            }

            var ctor = GetCorrectConstructor(node, type, node.Arguments);
            if (ctor != null)
            {
                BindConstructorInvocation(node, ctor);
                if (node.NamedArguments.Count > 0)
                    ReplaceTypeInvocationByEval(type, node);
                return;
            }

            Error(node);
        }
ProcessMethodBodies