Namespace Concord.Emit
The IL composition layer. WrapperComposer and BodyCopier build a wrapper from the original body and its patches. This namespace also defines InjectAt, control-handle lowering, and the Operation family. Rejected patches fail here with a CONCxxx code. Most mod authors do not use these types directly.
Classes
- ComposeResult
Contains the wrapper and original-body callable produced by WrapperComposer.
- ConcordEmitException
Exception thrown when Concord cannot compose a wrapper for a target method.
- InjectAt
Base type for supported injection positions inside a generated wrapper.
- InjectAt.Around
Wraps the entire target method. The injection method declares an Operation family handle and calls
original.Invoke(args)to run the original body; omitting the call skips the body. Operation-only (no ControlHandle).
- InjectAt.Constant
Targets an inlined literal constant in the target body.
- InjectAt.Head
Inserts the injection before the target method body.
- InjectAt.Invoke
Targets a named method or property call inside the target body. Head and Tail also target field reads.
- InjectAt.NewObj
Targets a
newobjinstruction inside the target body.
- InjectAt.Return
Inserts the injection before each
returnin the target body, reading and replacing the value returned at that site.
- InjectAt.Tail
Inserts the injection before the last
returnin the target body (Mixin@At("TAIL")semantics). A protected-regionleavethat reaches that return runs the injection, including after a caught exception. Exceptions that escape the target do not. Early returns are not affected; use InjectAt.Return to target every return site.
- InjectAt.Transpiler
Rewrites the target body's raw IL through an author-supplied transpiler method.
- Injection
Describes one injection method that should be copied into a generated wrapper.
- OriginalBody
Creates callable clones of original target method bodies.
- ReversePatchFactory
Binds delegates that call original target method bodies directly.
- SliceRange
A range of a target body, expressed as two member-access anchors. An injection that carries a range matches and counts only inside it.
- WrapperComposer
Builds composed wrapper methods from an original target and ordered Concord injections.