mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
fix
This commit is contained in:
parent
0d1b005306
commit
503fc23aca
@ -1,11 +1,11 @@
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using DCFApixels.DragonECS.RunnersCore;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using static DCFApixels.DragonECS.EcsDebugUtility;
|
||||
|
||||
|
14
src/Utils/ReflectionExtensions.cs
Normal file
14
src/Utils/ReflectionExtensions.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace DCFApixels.DragonECS.Internal
|
||||
{
|
||||
internal static class ReflectionExtensions
|
||||
{
|
||||
public static bool TryGetAttribute<T>(this MemberInfo self, out T attribute) where T : Attribute
|
||||
{
|
||||
attribute = self.GetCustomAttribute<T>();
|
||||
return attribute != null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user