Class CodeMatch
A CodeInstruction match
Inheritance
System.Object
CodeMatch
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: HarmonyLib
Assembly: 0Harmony.dll
Syntax
public class CodeMatch
Constructors
| Improve this Doc View SourceCodeMatch(CodeInstruction, String)
Creates a code match
Declaration
public CodeMatch(CodeInstruction instruction, string name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CodeInstruction | instruction | The CodeInstruction |
| System.String | name | An optional name |
CodeMatch(Func<CodeInstruction, Boolean>, String)
Creates a code match
Declaration
public CodeMatch(Func<CodeInstruction, bool> predicate, string name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Func<CodeInstruction, System.Boolean> | predicate | The predicate |
| System.String | name | An optional name |
CodeMatch(Nullable<OpCode>, Object, String)
Creates a code match
Declaration
public CodeMatch(OpCode? opcode = default(OpCode? ), object operand = null, string name = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Nullable<System.Reflection.Emit.OpCode> | opcode | The optional opcode |
| System.Object | operand | The optional operand |
| System.String | name | The optional name |
Fields
| Improve this Doc View Sourceblocks
The matched blocks
Declaration
public List<ExceptionBlock> blocks
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<ExceptionBlock> |
jumpsFrom
The jumps from the match
Declaration
public List<int> jumpsFrom
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Int32> |
jumpsTo
The jumps to the match
Declaration
public List<int> jumpsTo
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Int32> |
labels
The matched labels
Declaration
public List<Label> labels
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Reflection.Emit.Label> |
name
The name of the match
Declaration
public string name
Field Value
| Type | Description |
|---|---|
| System.String |
opcodes
The matched opcodes
Declaration
public List<OpCode> opcodes
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Reflection.Emit.OpCode> |
operands
The matched operands
Declaration
public List<object> operands
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Object> |
predicate
The match predicate
Declaration
public Func<CodeInstruction, bool> predicate
Field Value
| Type | Description |
|---|---|
| System.Func<CodeInstruction, System.Boolean> |
Methods
| Improve this Doc View SourceToString()
Returns a string that represents the match
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string representation |
Overrides
System.Object.ToString()