Class MelonAssembly
Inheritance
MelonAssembly
Assembly: RedLoader.dll
Syntax
public sealed class MelonAssembly
Fields
OnAssemblyResolving
Called before a process of resolving Melons from a MelonAssembly has started.
Declaration
public static readonly MelonEvent<Assembly> OnAssemblyResolving
Field Value
OnUnregister
Declaration
public readonly MelonEvent OnUnregister
Field Value
Properties
Assembly
Declaration
public Assembly Assembly { get; }
Property Value
HarmonyDontPatchAll
Declaration
public bool HarmonyDontPatchAll { get; }
Property Value
Hash
A SHA256 Hash of the Assembly.
Declaration
public string Hash { get; }
Property Value
LoadedAssemblies
List of all loaded MelonAssemblies.
Declaration
public static ReadOnlyCollection<MelonAssembly> LoadedAssemblies { get; }
Property Value
LoadedMelons
A list of all loaded Melons in the Assembly.
Declaration
public ReadOnlyCollection<ModBase> LoadedMelons { get; }
Property Value
Location
Declaration
public string Location { get; }
Property Value
RottenMelons
A list of all broken Melons in the Assembly.
Declaration
public ReadOnlyCollection<RottenMelon> RottenMelons { get; }
Property Value
Methods
FindMelonInstance<T>()
Tries to find the instance of Melon with type T, whether it's registered or not
Declaration
public static T FindMelonInstance<T>() where T : ModBase
Returns
Type Parameters
GetMelonAssemblyOfMember(MemberInfo, object)
Gets the MelonAssembly of the given member. If the given member is not in any MelonAssembly, returns null.
Declaration
public static MelonAssembly GetMelonAssemblyOfMember(MemberInfo member, object obj = null)
Parameters
Returns
LoadMelonAssembly(string, bool)
Loads or finds a MelonAssembly from path.
Declaration
public static MelonAssembly LoadMelonAssembly(string path, bool loadMelons = true)
Parameters
Type |
Name |
Description |
string |
path |
Path of the MelonAssembly
|
bool |
loadMelons |
Sets whether Melons should be auto-loaded or not
|
Returns
LoadMelonAssembly(string, Assembly, bool)
Loads or finds a MelonAssembly.
Declaration
public static MelonAssembly LoadMelonAssembly(string path, Assembly assembly, bool loadMelons = true)
Parameters
Returns
LoadMelons()
Declaration
LoadRawMelonAssembly(string, byte[], byte[], bool)
Loads or finds a MelonAssembly from raw Assembly Data.
Declaration
public static MelonAssembly LoadRawMelonAssembly(string path, byte[] assemblyData, byte[] symbolsData = null, bool loadMelons = true)
Parameters
Returns
UnregisterMelons(string, bool)
Unregisters all Melons in this Assembly.
Declaration
public void UnregisterMelons(string reason = null, bool silent = false)
Parameters
Events
CustomMelonResolvers
Declaration
public static event LemonFunc<MelonAssembly, ResolvedMelons> CustomMelonResolvers
Event Type