Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
Parameters = ((MethodDeclarationSyntax)gac.TargetNode).ParameterList.Parameters
.Select(p => new SinteredMethodData.MethodData.ParameterData
{
Attributes = p.AttributeLists.ToString(),
Modifier = p.Modifiers.ToString(),
Type = p.Type.ToString(),
ParameterName = p.Identifier.Text
Expand Down Expand Up @@ -114,8 +113,6 @@ public struct MethodData
public IEnumerable<ParameterData> Parameters { get; set; }
public struct ParameterData
{
public string Attributes { get; set; }

public string Modifier { get; set; }

public string Type { get; set; }
Expand All @@ -124,7 +121,10 @@ public struct ParameterData

public override string ToString()
{
return string.Join(" ", new[] { Attributes, Modifier, Type, ParameterName }.Where(s => string.IsNullOrWhiteSpace(s) == false));
if (string.IsNullOrWhiteSpace(Modifier))
return $"{Type} {ParameterName}";

return $"{Modifier} {Type} {ParameterName}";
}
}
}
Expand Down