ReflectionHelper - Qkrisi/ktanemodkit GitHub Wiki

ReflectionHelper

public static class ReflectionHelper

Provides functions and fields that can help with reflection.


public static readonly BindingFlags AllFlags;

Flags that work for any access level.


public const string GameAssembly;

Holds the name of the game's internal assembly.


public static Type FindType(string fullName, string assemblyName = null)

Find a type with the given full name, in the given assemblyName if specified, otherwise in any assembly.

Will return null if the type couldn't be found.


public static Type FindGameType(string fullName)

Find a type in the internal assembly of KTaNE.


public static IEnumerable<Type> GetSafeTypes(this Assembly assembly)

Gets all the types from an assembly, handling ReflectionTypeLoadException.

⚠️ **GitHub.com Fallback** ⚠️