Class ILContext
An IL manipulation "context" with various helpers and direct access to the MethodBody.
public class ILContext
- Inheritance
-
ILContext
Constructors
Properties
- Body
- The manipulated method body.
- IL
- The manipulated method's IL processor.
- Instrs
- The manipulated method instructions.
- IsReadOnly
- Has the context been made read-only? No further method access is possible, but the context has not yet been disposed.
- Labels
- A readonly list of all defined labels.
- Method
- The manipulated method.
- Module
- The manipulated method's module.
Methods
- AddReference<T>(in T?)
- Bind an arbitary object to an ILContext for static retrieval.
- DefineLabel()
- Define a new label to be marked with a cursor.
- DefineLabel(Instruction)
- Define a new label pointing at a given instruction.
- Dispose()
- Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- GetIncomingLabels(Instruction?)
- Obtain all labels pointing at the given instruction.
- IndexOf(Instruction?)
- Determine the index of a given instruction.
- Invoke(Manipulator)
- Invoke a given manipulator callback.
- MakeReadOnly()
- Mark this ILContext as read-only and prevent this context from further accessing the originally passed method.
- ToString()
- Obtain a string representation of this context (method ID and body).
Events
- OnDispose
- Events which run when the context will be disposed.