From c809f7c755b257a3d17314ccaad2fa7f9e9aefce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 08:03:00 +0000 Subject: [PATCH 1/2] Initial plan From 6fb1d9e9cf5670b8bb9bdf5bc2739b12dfd0a3ad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 26 Nov 2025 08:06:52 +0000 Subject: [PATCH 2/2] REFACTOR: Materialize inheritance chain results for better caching Co-authored-by: mkholt <4355246+mkholt@users.noreply.github.com> --- .../Validation/HandlerMethodValidator.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/XrmPluginCore.SourceGenerator/Validation/HandlerMethodValidator.cs b/XrmPluginCore.SourceGenerator/Validation/HandlerMethodValidator.cs index 0113aed..2e09d9f 100644 --- a/XrmPluginCore.SourceGenerator/Validation/HandlerMethodValidator.cs +++ b/XrmPluginCore.SourceGenerator/Validation/HandlerMethodValidator.cs @@ -48,18 +48,20 @@ public static void ValidateHandlerMethod( } } - private static IEnumerable GetAllMethodsIncludingInherited(ITypeSymbol type, string methodName) + private static IReadOnlyList GetAllMethodsIncludingInherited(ITypeSymbol type, string methodName) { + var methods = new List(); var currentType = type; while (currentType is not null) { foreach (var member in currentType.GetMembers(methodName)) { if (member is IMethodSymbol method) - yield return method; + methods.Add(method); } currentType = currentType.BaseType; } + return methods; } private static bool SignatureMatches(IMethodSymbol method, bool hasPreImage, bool hasPostImage)