From 388602b75731286f50d3a5e70cba375878377e11 Mon Sep 17 00:00:00 2001 From: DocSvartz Date: Mon, 20 Apr 2026 10:02:23 +0500 Subject: [PATCH] fix: fix IsNotSelfCreation detect from #918 --- src/Mapster/Utils/ReflectionUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mapster/Utils/ReflectionUtils.cs b/src/Mapster/Utils/ReflectionUtils.cs index a010984a..aa798fc1 100644 --- a/src/Mapster/Utils/ReflectionUtils.cs +++ b/src/Mapster/Utils/ReflectionUtils.cs @@ -464,7 +464,7 @@ public static bool IsNotSelfCreation(this Type type) if (type == typeof(Type) || type.BaseType == typeof(MulticastDelegate)) return true; - return type.GetFieldsAndProperties().Any(it => (it.SetterModifier & (AccessModifier.Public | AccessModifier.NonPublic)) == 0); + return type.GetFieldsAndProperties().All(it => (it.SetterModifier & (AccessModifier.Public | AccessModifier.NonPublic)) == 0); } } }