chore: memberInfo.HasAttribute method added

This commit is contained in:
2025-04-22 21:08:46 +03:00
committed by Syntriax
parent a3a8fb4e84
commit 336e7e16e7
3 changed files with 6 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ namespace Syntriax.Engine.Serialization;
internal static class Utils
{
internal static bool HasAttribute<T>(this MemberInfo memberInfo) where T : Attribute => memberInfo.GetCustomAttribute<T>() is not null;
internal static bool IsEnumerable(this Type type) => typeof(System.Collections.IEnumerable).IsAssignableFrom(type) && type != typeof(string);
internal static TypeData GetTypeData(this Type objectType)