MonoDetourConfig Class
Definition
Section titled “Definition”Priority configuration for a MonoDetour Hook.
public class MonoDetourConfigInheritance object
Constructors
Section titled “Constructors”MonoDetourConfig(int, IEnumerable<string>?, IEnumerable<string>?, string?)
Section titled “MonoDetourConfig(int, IEnumerable<string>?, IEnumerable<string>?, string?)”Constructs a MonoDetourConfig with a specific ID, and any of the ordering options.
public MonoDetourConfig(int priority = 0, IEnumerable<string>? before = null, IEnumerable<string>? after = null, string? overrideId = null)Parameters
Section titled “Parameters”priority int
The priority of the detour config. Refer to Priority for details.
before IEnumerable<string>
An enumerable containing the list of IDs of detours to run before detours with this config.
after IEnumerable<string>
An enumerable containing the list of IDs of detours to run after detours with this config.
overrideId string
The ID for hooks. If not defined, MonoDetour applies Id as the hooks’ ID.
Properties
Section titled “Properties”OverrideId
Section titled “OverrideId”Gets the override ID if one is defined. If not defined, MonoDetour applies Id as the hooks’ ID.
public string? OverrideId { get; }Priority
Section titled “Priority”Gets the priority of the detours represented by this config.
public int Priority { get; }Remarks
Section titled “Remarks”The priority only affects the relative ordering of detours which are not otherwise ordered by e.g. Before or After.
MonoDetour hooks always have a priority which is 0 by default.
MonoMod detours with no priority are ordered after all detours which have a priority.
Before
Section titled “Before”Gets the detour IDs to run before this detour.
public IEnumerable<string> Before { get; }Remarks
Section titled “Remarks”This takes takes priority over Priority.
Gets the detour IDs to run after this detour.
public IEnumerable<string> After { get; }Remarks
Section titled “Remarks”This takes takes priority over Priority.
Methods
Section titled “Methods”WithPriority(int)
Section titled “WithPriority(int)”Creates a new MonoDetourConfig which is identical to this one, but with Priority equal to priority.
public MonoDetourConfig WithPriority(int priority)Parameters
Section titled “Parameters”priority int
The priority of the new MonoDetourConfig.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig identical to this one, but with Priority equal to priority.
WithBefore(IEnumerable<string>)
Section titled “WithBefore(IEnumerable<string>)”Creates a new MonoDetourConfig which is identical to this one, but with Before equal to before.
public MonoDetourConfig WithBefore(IEnumerable<string> before)Parameters
Section titled “Parameters”before IEnumerable<string>
The Before list for the new MonoDetourConfig.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig identical to this one, but with Before equal to before.
WithBefore(params string[])
Section titled “WithBefore(params string[])”Creates a new MonoDetourConfig which is identical to this one, but with Before equal to before.
public MonoDetourConfig WithBefore(params string[] before)Parameters
Section titled “Parameters”before string[]
The Before list for the new MonoDetourConfig.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig identical to this one, but with Before equal to before.
WithAfter(IEnumerable<string>)
Section titled “WithAfter(IEnumerable<string>)”Creates a new MonoDetourConfig which is identical to this one, but with After equal to after.
public MonoDetourConfig WithAfter(IEnumerable<string> after)Parameters
Section titled “Parameters”after IEnumerable<string>
The After list for the new MonoDetourConfig.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig identical to this one, but with After equal to after.
WithAfter(params string[])
Section titled “WithAfter(params string[])”Creates a new MonoDetourConfig which is identical to this one, but with After equal to after.
public MonoDetourConfig WithAfter(params string[] after)Parameters
Section titled “Parameters”after string[]
The After list for the new MonoDetourConfig.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig identical to this one, but with After equal to after.
AddBefore(IEnumerable<string>)
Section titled “AddBefore(IEnumerable<string>)”Creates a new MonoDetourConfig which is identical to this one, but with before added to Before.
public MonoDetourConfig AddBefore(IEnumerable<string> before)Parameters
Section titled “Parameters”before IEnumerable<string>
The list of IDs to add to Before.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig with before added to Before.
AddBefore(params string[])
Section titled “AddBefore(params string[])”Creates a new MonoDetourConfig which is identical to this one, but with before added to Before.
public MonoDetourConfig AddBefore(params string[] before)Parameters
Section titled “Parameters”before string[]
The list of IDs to add to Before.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig with before added to Before.
AddAfter(IEnumerable<string>)
Section titled “AddAfter(IEnumerable<string>)”Creates a new MonoDetourConfig which is identical to this one, but with after added to After.
public MonoDetourConfig AddAfter(IEnumerable<string> after)Parameters
Section titled “Parameters”after IEnumerable<string>
The list of IDs to add to After.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig with after added to After.
AddAfter(params string[])
Section titled “AddAfter(params string[])”Creates a new MonoDetourConfig which is identical to this one, but with after added to After.
public MonoDetourConfig AddAfter(params string[] after)Parameters
Section titled “Parameters”after string[]
The list of IDs to add to After.
Returns
Section titled “Returns”MonoDetourConfig
A MonoDetourConfig with after added to After.