internal override void CollectInputExpressions(List <StatementSyntax> expressions)
        {
            // Insert expressions from connected nodes
            base.CollectInputExpressions(expressions);

            // Create container variables for output parameters.
            // Assign correct identifiers to method call.
            var args       = new List <SyntaxNodeOrToken>();
            var parameters = m_methodInfo.GetParameters();
            var index      = 0;

            // Skip the first parameter for extension methods.
            if (m_methodInfo.IsDefined(typeof(ExtensionAttribute), false))
            {
                index++;
            }

            for (; index < parameters.Length; index++)
            {
                var parameter = parameters[index];
                // Create container variables for output parameters.
                if (parameter.IsOut)
                {
                    // Output parameters
                    var localOutputVariableName = VariableSyntaxName(parameter.Name);
                    // add variable creation expression
                    expressions.Add(MySyntaxFactory.LocalVariable(parameter.ParameterType.GetElementType().Signature(), localOutputVariableName));
                    // add variable name to parameters
                    args.Add(SyntaxFactory.Argument(
                                 SyntaxFactory.IdentifierName(localOutputVariableName)
                                 ).WithNameColon(SyntaxFactory.NameColon(parameter.Name))
                             .WithRefOrOutKeyword(SyntaxFactory.Token(SyntaxKind.OutKeyword)
                                                  )
                             );
                }
                // Get the names of the variables supplying the values to the method call

                else
                {
                    // Find the value input node
                    MyTuple <MyVisualSyntaxNode, MyVariableIdentifier> inputData;
                    if (m_parametersToInputs.TryGetValue(parameter, out inputData))
                    {
                        // FOUND!
                        // add variable name to arguments
                        var variableName = inputData.Item1.VariableSyntaxName(inputData.Item2.VariableName);
                        Debug.Assert(variableName != null);
                        args.Add(SyntaxFactory.Argument(
                                     SyntaxFactory.IdentifierName(
                                         variableName
                                         )
                                     ).WithNameColon(SyntaxFactory.NameColon(parameter.Name))
                                 );
                    }
                    else
                    {
                        // Not FOUND! will be probably an constant argument
                        var paramValue =
                            ObjectBuilder.InputParameterValues.Find(value => value.ParameterName == parameter.Name);
                        if (paramValue == null)
                        {
                            // Dont panic, there could be still the default value.
                            if (!parameter.HasDefaultValue)
                            {
                                // Add null / some default value
                                args.Add(
                                    MySyntaxFactory.ConstantDefaultArgument(parameter.ParameterType)
                                    .WithNameColon(SyntaxFactory.NameColon(parameter.Name))
                                    );
                            }
                            else
                            {
                                // default value will take care of this
                                continue; // no comma for you args
                            }
                        }
                        else
                        {
                            // Add constant value to arguments
                            args.Add(MySyntaxFactory.ConstantArgument(
                                         parameter.ParameterType.Signature(), paramValue.Value
                                         ).WithNameColon(SyntaxFactory.NameColon(parameter.Name))
                                     );
                        }
                    }
                }

                // add comma
                args.Add(SyntaxFactory.Token(SyntaxKind.CommaToken));
            }

            // remove last comma
            if (args.Count > 0)
            {
                args.RemoveAt(args.Count - 1);
            }

            // Create the invocation syntax
            InvocationExpressionSyntax methodInvocation = null;

            if (m_methodInfo.IsStatic && !m_methodInfo.IsDefined(typeof(ExtensionAttribute)))
            {
                // Static call
                methodInvocation = MySyntaxFactory.MethodInvocationExpressionSyntax(
                    SyntaxFactory.IdentifierName(m_methodInfo.DeclaringType.FullName + "." + m_methodInfo.Name),
                    SyntaxFactory.ArgumentList(SyntaxFactory.SeparatedList <ArgumentSyntax>(args))
                    );
            }
            else
            {
                var declaringType = m_methodInfo.DeclaringType;
                // Non static local method invocation
                if (declaringType == m_scriptBaseType)
                {
                    methodInvocation = MySyntaxFactory.MethodInvocationExpressionSyntax(
                        SyntaxFactory.IdentifierName(m_methodInfo.Name),
                        SyntaxFactory.ArgumentList(SyntaxFactory.SeparatedList <ArgumentSyntax>(args))
                        );
                }
                // Non static instance method invocation or extension method
                else
                {
                    if (m_instance == null)
                    {
                        throw new Exception("FunctionNode: " + ObjectBuilder.ID +
                                            " Is missing mandatory instance input.");
                    }

                    var instanceVariableName = m_instance.VariableSyntaxName(ObjectBuilder.InstanceInputID.VariableName);
                    methodInvocation = MySyntaxFactory.MethodInvocationExpressionSyntax(
                        SyntaxFactory.IdentifierName(m_methodInfo.Name),
                        SyntaxFactory.ArgumentList(SyntaxFactory.SeparatedList <ArgumentSyntax>(args)),
                        SyntaxFactory.IdentifierName(instanceVariableName)
                        );
                }
            }

            // Finalize the syntax
            if (m_methodInfo.ReturnType == typeof(void))
            {
                // just add invocation
                expressions.Add(
                    SyntaxFactory.ExpressionStatement(methodInvocation)
                    );
            }
            else
            {
                // Create variable for return value
                expressions.Add(
                    MySyntaxFactory.LocalVariable(
                        string.Empty,
                        VariableSyntaxName("Return"),
                        methodInvocation
                        )
                    );
            }
        }