예제 #1
0
        public static Parameter[] GetParameters(this ConstructorDeclarationSyntax syntax, TypeNode parent)
        {
            var hierachy      = parent.GetTypeParameterHierachy();
            var typeConverter = new TypeSyntaxConverter(hierachy);

            return(syntax?.ParameterList.Parameters.Select(x => ToParameter(x, typeConverter)).ToArray());
        }
예제 #2
0
        private static Parameter ToParameter(ParameterSyntax param, TypeSyntaxConverter typeConverter)
        {
            var paramType = typeConverter.ConvertTypeStructure(param.Type);

            return(new Parameter(paramType, HasModifier(param.Modifiers)));
        }