Search Results for

    Class MelonAssembly

    Inheritance
    object
    MelonAssembly
    Inherited Members
    object.GetType()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: RedLoader
    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
    Type Description
    MelonEvent<Assembly>

    OnUnregister

    Declaration
    public readonly MelonEvent OnUnregister
    Field Value
    Type Description
    MelonEvent

    Properties

    Assembly

    Declaration
    public Assembly Assembly { get; }
    Property Value
    Type Description
    Assembly

    HarmonyDontPatchAll

    Declaration
    public bool HarmonyDontPatchAll { get; }
    Property Value
    Type Description
    bool

    Hash

    A SHA256 Hash of the Assembly.

    Declaration
    public string Hash { get; }
    Property Value
    Type Description
    string

    LoadedAssemblies

    List of all loaded MelonAssemblies.

    Declaration
    public static ReadOnlyCollection<MelonAssembly> LoadedAssemblies { get; }
    Property Value
    Type Description
    ReadOnlyCollection<MelonAssembly>

    LoadedMelons

    A list of all loaded Melons in the Assembly.

    Declaration
    public ReadOnlyCollection<ModBase> LoadedMelons { get; }
    Property Value
    Type Description
    ReadOnlyCollection<ModBase>

    Location

    Declaration
    public string Location { get; }
    Property Value
    Type Description
    string

    RottenMelons

    A list of all broken Melons in the Assembly.

    Declaration
    public ReadOnlyCollection<RottenMelon> RottenMelons { get; }
    Property Value
    Type Description
    ReadOnlyCollection<RottenMelon>

    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 Description
    T
    Type Parameters
    Name Description
    T

    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
    Type Name Description
    MemberInfo member
    object obj
    Returns
    Type Description
    MelonAssembly

    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
    Type Description
    MelonAssembly

    LoadMelonAssembly(string, Assembly, bool)

    Loads or finds a MelonAssembly.

    Declaration
    public static MelonAssembly LoadMelonAssembly(string path, Assembly assembly, bool loadMelons = true)
    Parameters
    Type Name Description
    string path
    Assembly assembly
    bool loadMelons
    Returns
    Type Description
    MelonAssembly

    LoadMelons()

    Declaration
    public void LoadMelons()

    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
    Type Name Description
    string path
    byte[] assemblyData
    byte[] symbolsData
    bool loadMelons
    Returns
    Type Description
    MelonAssembly

    UnregisterMelons(string, bool)

    Unregisters all Melons in this Assembly.

    Declaration
    public void UnregisterMelons(string reason = null, bool silent = false)
    Parameters
    Type Name Description
    string reason
    bool silent

    Events

    CustomMelonResolvers

    Declaration
    public static event LemonFunc<MelonAssembly, ResolvedMelons> CustomMelonResolvers
    Event Type
    Type Description
    LemonFunc<MelonAssembly, ResolvedMelons>