From 593e66b58cc386d21e075c6dff1ae29935e9fdc3 Mon Sep 17 00:00:00 2001 From: Oleksandr Liakhevych Date: Fri, 25 Apr 2025 11:37:18 +0300 Subject: [PATCH] Use FullyQualifiedFormat for custom parameters --- ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs | 2 +- ServiceScan.SourceGenerator/Model/MethodModel.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs b/ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs index 0953565..54e1aa0 100644 --- a/ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs +++ b/ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs @@ -148,7 +148,7 @@ namespace GeneratorTests; public static partial class ServicesExtensions { - public static partial GeneratorTests.IServices ProcessServices(this GeneratorTests.IServices services) + public static partial global::GeneratorTests.IServices ProcessServices(this global::GeneratorTests.IServices services) { HandleType(services); HandleType(services); diff --git a/ServiceScan.SourceGenerator/Model/MethodModel.cs b/ServiceScan.SourceGenerator/Model/MethodModel.cs index 64c246e..a906494 100644 --- a/ServiceScan.SourceGenerator/Model/MethodModel.cs +++ b/ServiceScan.SourceGenerator/Model/MethodModel.cs @@ -22,7 +22,8 @@ record MethodModel( public static MethodModel Create(IMethodSymbol method, SyntaxNode syntax) { - EquatableArray parameters = [.. method.Parameters.Select(p => new ParameterModel(p.Type.ToDisplayString(), p.Name))]; + EquatableArray parameters = [.. method.Parameters + .Select(p => new ParameterModel(p.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat), p.Name))]; var typeSyntax = syntax.FirstAncestorOrSelf(); @@ -36,7 +37,7 @@ public static MethodModel Create(IMethodSymbol method, SyntaxNode syntax) Parameters: parameters, IsExtensionMethod: method.IsExtensionMethod, ReturnsVoid: method.ReturnsVoid, - ReturnType: method.ReturnType.ToDisplayString()); + ReturnType: method.ReturnType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)); } private static string GetModifiers(SyntaxNode syntax)