From 86028d58ce6c6fcfd58cdb7ef58985d682ae27c3 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Thu, 7 Nov 2024 16:04:27 +1100 Subject: [PATCH] Update BuildApiTest.cs --- src/ApiBuilderTests/BuildApiTest.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ApiBuilderTests/BuildApiTest.cs b/src/ApiBuilderTests/BuildApiTest.cs index 07edee94..73031590 100644 --- a/src/ApiBuilderTests/BuildApiTest.cs +++ b/src/ApiBuilderTests/BuildApiTest.cs @@ -171,12 +171,13 @@ static string BuildKey(MethodDeclarationSyntax method) static string BuildTypeArgs(MethodDeclarationSyntax method) { - if (method.TypeParameterList == null || method.TypeParameterList.Parameters.Count == 0) + var types = method.TypeParameterList; + if (types == null || types.Parameters.Count == 0) { return string.Empty; } - return $"<{string.Join(", ", method.TypeParameterList.Parameters.Select(_ => _.Identifier.Text))}>"; + return $"<{string.Join(", ", types.Parameters.Select(_ => _.Identifier.Text))}>"; } static string BuildParameters(MethodDeclarationSyntax method)