update
This commit is contained in:
23
Assets/Plugins/XRLib/Util/ReflectionExtend.cs
Normal file
23
Assets/Plugins/XRLib/Util/ReflectionExtend.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace WI
|
||||
{
|
||||
public static partial class ReflectionExtend
|
||||
{
|
||||
public static FieldInfo GetAllField(this Type target, string name)
|
||||
{
|
||||
return target.GetField(name, BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
|
||||
}
|
||||
|
||||
public static FieldInfo[] GetAllFields(this Type target)
|
||||
{
|
||||
return target.GetFields(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
|
||||
}
|
||||
|
||||
public static PropertyInfo[] GetAllProperties(this Type target)
|
||||
{
|
||||
return target.GetProperties(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Public);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user