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()); }
private static Parameter ToParameter(ParameterSyntax param, TypeSyntaxConverter typeConverter) { var paramType = typeConverter.ConvertTypeStructure(param.Type); return(new Parameter(paramType, HasModifier(param.Modifiers))); }