From a205e387768cbb848208e17349c016bdb230c85c Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Thu, 7 Nov 2024 16:37:09 +1100 Subject: [PATCH] Update BuildApiTest.cs --- src/ApiBuilderTests/BuildApiTest.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ApiBuilderTests/BuildApiTest.cs b/src/ApiBuilderTests/BuildApiTest.cs index 73031590..0316c007 100644 --- a/src/ApiBuilderTests/BuildApiTest.cs +++ b/src/ApiBuilderTests/BuildApiTest.cs @@ -161,12 +161,14 @@ static void WriteSignature(MethodDeclarationSyntax method, StreamWriter writer) static string BuildKey(MethodDeclarationSyntax method) { var parameters = string.Join(',', method.ParameterList.Parameters.Select(_ => _.Type!.ToString())); + var returnType = method.ReturnType.ToString(); + var identifier = method.Identifier.Text; if (method.TypeParameterList is null) { - return $"{method.ReturnType.ToString()}{method.Identifier.Text}({parameters})"; + return $"{returnType}{identifier}({parameters})"; } - return $"{method.ReturnType.ToString()}{method.Identifier.Text}<{string.Join(',', method.TypeParameterList.Parameters.Select(_ => _.Identifier.Text))}>({parameters})"; + return $"{returnType}{identifier}<{string.Join(',', method.TypeParameterList.Parameters.Select(_ => _.Identifier.Text))}>({parameters})"; } static string BuildTypeArgs(MethodDeclarationSyntax method)