From 15c052f0376bca3b15d5842f95b0ca22265affdc Mon Sep 17 00:00:00 2001 From: Johan Kristensen Date: Wed, 30 Sep 2026 11:35:58 +0200 Subject: [PATCH] Exclude byte[] from collection types --- src/Dapper.AOT.Analyzers/Internal/Inspection.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Dapper.AOT.Analyzers/Internal/Inspection.cs b/src/Dapper.AOT.Analyzers/Internal/Inspection.cs index 8a0ee6da..449c9fa4 100644 --- a/src/Dapper.AOT.Analyzers/Internal/Inspection.cs +++ b/src/Dapper.AOT.Analyzers/Internal/Inspection.cs @@ -479,6 +479,11 @@ private static bool IsCollectionType(ITypeSymbol? parameterType, out ITypeSymbol if (parameterType.IsArray()) { elementType = parameterType.GetContainingTypeSymbol(); + if (elementType?.SpecialType == SpecialType.System_Byte) + { + elementType = null; + return false; + } if (getCastType) castType = elementType.GetTypeDisplayName() + "[]"; return true; }