2021-04-27 21:22:48 +10:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace UnityExplorer.UI.Inspectors.CacheObject
|
|
|
|
|
{
|
|
|
|
|
public class CacheMethod : CacheMember
|
|
|
|
|
{
|
|
|
|
|
public MethodInfo MethodInfo { get; internal set; }
|
|
|
|
|
|
2021-04-28 20:47:48 +10:00
|
|
|
|
public override bool ShouldAutoEvaluate => false;
|
|
|
|
|
|
2021-04-30 21:34:50 +10:00
|
|
|
|
public override void SetInspectorOwner(ReflectionInspector inspector, MemberInfo member)
|
2021-04-27 21:22:48 +10:00
|
|
|
|
{
|
2021-04-30 21:34:50 +10:00
|
|
|
|
base.SetInspectorOwner(inspector, member);
|
2021-04-27 21:22:48 +10:00
|
|
|
|
|
2021-04-28 20:47:48 +10:00
|
|
|
|
Arguments = MethodInfo.GetParameters();
|
2021-04-27 21:22:48 +10:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void TryEvaluate()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException("TODO");
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
HadException = true;
|
|
|
|
|
LastException = ex;
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-04-29 21:01:08 +10:00
|
|
|
|
|
|
|
|
|
protected override void TrySetValue(object value) => throw new NotImplementedException("You can't set a method");
|
2021-04-27 21:22:48 +10:00
|
|
|
|
}
|
|
|
|
|
}
|