Beispiel #1
0
        internal static List <TheMethodArgument> getArguments(IEnumerable <CsFormalParameter> pLinkedList, FactoryExpressionCreator pCreator)
        {
            List <TheMethodArgument> arguments = new List <TheMethodArgument>();

            if (pLinkedList != null)
            {
                arguments.AddRange(from param in pLinkedList
                                   let e = param.default_argument == null ? null : pCreator.Parse(param.default_argument.expression)
                                           select new TheMethodArgument {
                    Name         = param.identifier.identifier,
                    Type         = param.type == null ? Helpers.GetType(param.entity.type) : Helpers.GetType(param.type),
                    DefaultValue = e
                });
            }

            return(arguments);
        }