Browse documentation

Enum ArgumentMode

Namespace
HarmonyLib
Assembly
0Harmony.dll

Specifies how Harmony resolves an argument name

public enum ArgumentMode

Fields

Captured = 2

Match a preserved compiler-generated captured variable in an Infix scope

Default = 0

Use Harmony's default argument name handling

Original = 1

Match an original method argument by its exact name

Persistent = 3

Bind a named, patch-owned outer value that survives awaits and iterator yields

Requires HarmonyOuter on an Infix parameter. Slots are scoped to the actual patch declaring type and name, start at default, and last one async execution or enumeration. Ordinary methods use one invocation. Values must be storable on the managed heap. Completion releases references without disposing stored objects.

Harmony 3 preview

For the stable release, read the 2.x documentation.