tModLoader v2024.03
A mod to make and play Terraria mods
LoaderUtils Class Reference

Classes

class  MethodOverrideQuery
 

Static Public Member Functions

static void ForEachAndAggregateExceptions< T > (IEnumerable< T > enumerable, Action< T > action)
 
static MethodInfo GetDerivedDefinition (Type t, MethodInfo baseMethod)
 
static bool HasMethod (Type type, Type declaringType, string method, params Type[] args)
 
static bool HasOverride (Type t, MethodInfo baseMethod)
 
static bool HasOverride< T > (T t, Expression< Func< T, Delegate > > expr)
 
static bool HasOverride< T, F > (T t, Expression< Func< T, F > > expr)
 
static void MustOverrideTogether< T > (T t, params Expression< Func< T, Delegate > >[] methods)
 
static void ResetStaticMembers (Type type, bool recursive=true)
 Calls static constructors on the provided type and, optionally, its nested types.
 
static void RethrowAggregatedExceptions (IReadOnlyCollection< Exception > exceptions)
 
static MethodInfo ToMethodInfo< T, F > (this Expression< Func< T, F > > expr)
 
static MethodOverrideQuery< T > ToOverrideQuery< T, F > (this Expression< Func< T, F > > expr)
 
static IEnumerable< T > WhereMethodIsOverridden< T > (this IEnumerable< T > providers, Expression< Func< T, Delegate > > expr)
 
static IEnumerable< T > WhereMethodIsOverridden< T > (this IEnumerable< T > providers, MethodInfo method)
 
static IEnumerable< T > WhereMethodIsOverridden< T, F > (this IEnumerable< T > providers, Expression< Func< T, F > > expr)
 

Member Function Documentation

◆ HasOverride< T, F >()

static bool LoaderUtils.HasOverride< T, F > ( t,
Expression< Func< T, F > >  expr 
)
static
Type Constraints
F :Delegate 
F :expr.ToOverrideQuery() 
F :HasOverride 
F :t 

◆ ToMethodInfo< T, F >()

static MethodInfo LoaderUtils.ToMethodInfo< T, F > ( this Expression< Func< T, F > >  expr)
static

Type Constraints
F :Delegate 

◆ ToOverrideQuery< T, F >()

static MethodOverrideQuery< T > LoaderUtils.ToOverrideQuery< T, F > ( this Expression< Func< T, F > >  expr)
static

Type Constraints
F :Delegate 
F :MethodOverrideQuery<T> 
F :Create 
F :expr 

◆ WhereMethodIsOverridden< T, F >()

static IEnumerable< T > LoaderUtils.WhereMethodIsOverridden< T, F > ( this IEnumerable< T >  providers,
Expression< Func< T, F > >  expr 
)
static
Type Constraints
F :Delegate 
F :providers.Where 
F :expr.ToOverrideQuery() 
F :HasOverride