Skip to content
Concord

Namespace Concord

The public Concord API that mod authors use: the patch and inject declaration model, the injection positions, the control and operation handles, and the apply/undo entry point. Patches built from these types are plain C#.

Classes

CallSiteSignature

An opaque carrier for a calli call-site signature. A transpiler can move or delete a calli instruction, but constructing a new signature is not supported in this version.

CaptureAttribute

Binds an injection parameter to one argument of the matched call site. Valid on Head and Tail shifts of the invoke and construction forms.

CodeInstruction

One IL instruction in an author-facing transpiler stream. Member names are lowercase to match Harmony so migrating transpiler bodies compile unchanged; do not rename them to house style.

CodeMatch

One step of a CodeMatcher search: either a specific opcode with an optional operand, or an arbitrary predicate a candidate instruction must satisfy.

CodeMatcher

A fluent positional cursor over a transpiler's IL stream. Locate a sequence with MatchStartForward(params CodeMatch[]) or MatchStartBackwards(params CodeMatch[]), then read or edit at the cursor and chain onward.

ConcordEnumException

Exception thrown when Concord cannot read or allocate an extended enum member.

ConsumerBuilder

Accepts the four consumer shapes for one enum. Each method patches the target and returns the same builder, so registrations chain.

ControlHandle

Control parameter passed to void-target injections that need to cancel target execution.

ControlHandle<T>

Control parameter passed to non-void-target injections that can inspect, replace, or supply the target method's return value.

CoreLibEnumDetours

Routes the Enum static methods through the extended enum registry, so an added member appears to code the adapter never registered a consumer for.

EnumConsumers

Registers the adapter methods that expose extended enum members to the rest of a game. Concord patches each registered method so it reports the added members alongside the compiled ones.

EnumMemberAttribute

Overrides the persisted id of an extended enum member. Use it after renaming a field, so the member keeps the integer it already has in saved data.

ExceptionBlock

An exception-handling boundary attached to a CodeInstruction. Member names are lowercase to match Harmony so migrating transpiler bodies compile unchanged; do not rename them to house style.

ExtendedEnumMember

One member an extended enum declaration adds.

ExtendedEnumRegistry

Reads extended enum declarations, allocates member values, and assigns the declaration fields.

ExtendedEnum<TEnum>

Base type for a patch declaration that adds members to an existing enum. A declaration whose base is this type holds member fields, not injections.

InjectAttribute

Marks an injection method as an injection for a named target method.

InjectFieldAttribute

Marks a declaration field as an injected field declaration for a field on the patched target type.

InjectInstanceAttribute

Marks a declaration property as the patched target instance for explicit-target declarations.

InjectMethodAttribute

Marks a declaration method as an injected member declaration for a method on the patched target type.

InjectNewAttribute

Marks an injection method as targeting an object construction inside a target method.

InjectPropertyAttribute

Marks a declaration property as an injected property declaration for a property on the patched target type.

Operation

Control parameter used by invoke injections.

Operation<TResult>

Control parameter used by invoke injections that wrap a zero-argument value-producing call, such as a property getter, or a zero-parameter target method under whole-method Around.

Operation<T1, TResult>

Control parameter used by invoke injections that wrap a one-argument value-producing call, or a one-parameter target method under whole-method Around.

Operation<T1, T2, TResult>

Control parameter used by invoke injections that wrap a two-argument value-producing call, or a two-parameter target method under whole-method Around.

Operation<T1, T2, T3, TResult>

Control parameter used by invoke injections that wrap a three-argument value-producing call, or a three-parameter target method under whole-method Around.

Operation<T1, T2, T3, T4, TResult>

Control parameter used by invoke injections that wrap a four-argument value-producing call, or a four-parameter target method under whole-method Around.

Operation<T1, T2, T3, T4, T5, TResult>

Control parameter used by invoke injections that wrap a five-argument value-producing call, or a five-parameter target method under whole-method Around.

Operation<T1, T2, T3, T4, T5, T6, TResult>

Control parameter used by invoke injections that wrap a six-argument value-producing call, or a six-parameter target method under whole-method Around.

Operation<T1, T2, T3, T4, T5, T6, T7, TResult>

Control parameter used by invoke injections that wrap a seven-argument value-producing call, or a seven-parameter target method under whole-method Around.

Operation<T1, T2, T3, T4, T5, T6, T7, T8, TResult>

Control parameter used by invoke injections that wrap an eight-argument value-producing call, or an eight-parameter target method under whole-method Around.

PatchAfterAttribute

Orders this patch declaration after patches owned by the named type or owner.

PatchAttribute

Marks a type as a Concord patch declaration. Only types carrying this attribute are scanned by PatchDeclarationScanner: their InjectAttribute methods become patches and their declared fields become attached properties. A declaration may carry zero InjectAttribute methods (an attached-data-only declaration is valid).

PatchBeforeAttribute

Orders this patch declaration before patches owned by the named type or owner.

PatchBuilder

A fluent builder that accumulates one or more injections for a single target method and applies them all in one Apply() call. Create instances via For(MethodBase) and its overloads.

PatchDebugAttribute

Marks a patch declaration to append its composed wrapper IL to Concord.PatchDebug.log on the current user's desktop when Concord applies it.

PatchRegistryAttribute

Assembly-level pointer at the generated patch registry. When present, Apply(Assembly) enumerates declarations through the registry instead of scanning every type in the assembly.

Patcher

The high-level entry point for applying Concord patches. Wraps the scan + compose + detour-apply pipeline so mod authors apply an assembly's PatchAttribute declarations, or a single explicit patch, with one call and revert by disposing the returned IPatchHandle.

ShadowAttribute

Opt-in marker consumed by Concord.Generators: generates the injected-member declaration (InjectFieldAttribute, InjectPropertyAttribute, or InjectMethodAttribute) for the named target member into the partial declaration class. Ignored at runtime.

SliceAttribute

Bounds an invoke or construction search to the code between two member-access anchors. The by ordinal on the injection then counts matches inside that range only.

VoidOperation<T1>

Control parameter used by invoke injections that wrap a one-argument void call, such as a property setter, or a one-parameter void target method under whole-method Around.

VoidOperation<T1, T2>

Control parameter used by invoke injections that wrap a two-argument void call, or a two-parameter void target method under whole-method Around.

VoidOperation<T1, T2, T3>

Control parameter used by invoke injections that wrap a three-argument void call, or a three-parameter void target method under whole-method Around.

VoidOperation<T1, T2, T3, T4>

Control parameter used by invoke injections that wrap a four-argument void call, or a four-parameter void target method under whole-method Around.

VoidOperation<T1, T2, T3, T4, T5>

Control parameter used by invoke injections that wrap a five-argument void call, or a five-parameter void target method under whole-method Around.

VoidOperation<T1, T2, T3, T4, T5, T6>

Control parameter used by invoke injections that wrap a six-argument void call, or a six-parameter void target method under whole-method Around.

VoidOperation<T1, T2, T3, T4, T5, T6, T7>

Control parameter used by invoke injections that wrap a seven-argument void call, or a seven-parameter void target method under whole-method Around.

VoidOperation<T1, T2, T3, T4, T5, T6, T7, T8>

Control parameter used by invoke injections that wrap an eight-argument void call, or an eight-parameter void target method under whole-method Around.

Structs

Label

An opaque branch-target handle inside a transpiled method body. Mint new labels via the transpiler context.

LocalRef

An opaque local-variable handle inside a transpiled method body. Declare new locals via the transpiler context.

Interfaces

IEnumValueStore

Runtime-adapter-supplied storage for the extended enum id-to-value map. Concord owns the model and the allocation rules; the adapter owns where the map lives.

IPatchDeclarationProvider

Enumerates the PatchAttribute declarations of an assembly without a reflection scan. Implemented by the registry type a PatchRegistryAttribute points at, normally emitted by Concord.Generators.

IPatchHandle

A disposable handle over one or more applied detours. Disposing reverts every detour the handle owns.

ITranspilerContext

Services available to a transpiler while it rewrites a method body: the method being patched, plus factories for new branch targets and local variables.

Enums

At

Public injection-position values for InjectAttribute and the fluent PatchBuilder. Maps to a InjectAt for composition.

Control

Flow decision returned from a head injection method: continue into the original target body or cancel it.

ExceptionBlockType

The kind of exception-handling boundary an ExceptionBlock marks.

PatchBody

Selects which body an injection attaches to when the target is an async or iterator method. The C# compiler splits those into two methods: the declared one, which just builds and returns the state machine, and the state machine's MoveNext, which holds the body that was written.