Cleanup runtime-specific

This commit is contained in:
Sinai
2021-04-07 17:20:09 +10:00
parent c2d9b9b59e
commit 2cc403ad17
29 changed files with 362 additions and 288 deletions

View File

@ -43,6 +43,9 @@ namespace UnityExplorer
public static object Cast(this object obj, Type castTo)
=> ReflectionProvider.Instance.Cast(obj, castTo);
public static T TryCast<T>(this object obj)
=> ReflectionProvider.Instance.TryCast<T>(obj);
/// <summary>
/// Check if the provided Type is assignable to IEnumerable.
/// </summary>
@ -201,10 +204,9 @@ namespace UnityExplorer
{
while (e.InnerException != null)
{
#if CPP
if (e.InnerException is System.Runtime.CompilerServices.RuntimeWrappedException)
break;
#endif
e = e.InnerException;
}
}