Class InnerMethod
- Namespace
- HarmonyLib
- Assembly
- 0Harmony.dll
Selects call occurrences of an exact method or explicit generic family inside an outer method
public class InnerMethod
- Inheritance
-
objectInnerMethod
Constructors
InnerMethod(MethodInfo, params int[])
Creates an inner call selector
public InnerMethod(MethodInfo method, params int[] positions)
Parameters
methodMethodInfoThe exact called method or an explicit generic definition
positionsint[]One-based occurrences, negative from the end, or empty for all
Fields
positions
One-based matches; negative positions count from the end, and empty selects all
public int[] positions
Field Value
- int[]
Remarks
Counts calls after transpilers, before Infix insertion. Zero, null and missing positions are invalid; at least one match is required. Installation copies the selector and positions, so later edits do not affect installed patches.
Properties
Method
The exact method or explicitly selected generic definition
public MethodInfo Method { get; set; }
Property Value
- MethodInfo
Methods
Equals(object)
Compares call selectors, independently of their occurrence positions
public override bool Equals(object obj)
Parameters
objobject
Returns
- bool
Remarks
Compares stored identities without resolving loaded modules. Registration validates live targets separately.
GetHashCode()
Returns the hash of the call selector, independently of its occurrence positions
public override int GetHashCode()
Returns
- int