Table of Contents

Constructor AbiArgumentMapElement

Namespace
MonoMod.Core.Platforms
Assembly
MonoMod.Core.dll

AbiArgumentMapElement(SpecialArgumentKind, SpecialArgumentKind, int)

A mapping of a method argument from one MethodAbi to another.
public AbiArgumentMapElement(SpecialArgumentKind SourceArgument, SpecialArgumentKind TargetArgument, int TargetArgumentOffset)

Parameters

SourceArgument SpecialArgumentKind
The source argument being mapped.
TargetArgument SpecialArgumentKind
The destination argument to map to.
TargetArgumentOffset int
The offset of the target argument, if TargetArgument is UserArguments.

Remarks

The following mappings are valid:

  • Any SourceArgument except UserArguments to itself
  • Any SourceArgument except UserArguments to TargetArgument=UserArguments, in which case the the source argument is mapped to the user argument with index TargetArgumentOffset
  • SourceArgument=UserArguments to TargetArgument=UserArguments, in which case the source user arguments will be mapped to the target user arguments starting at the user argument with index TargetArgumentOffset

In a full mapping, all of a method's target arguments must be bound to exactly one source argument.

In a full mapping, each source argument may be bound to at most one target argument.

In a full mapping, if a source argument is not mapped, that argument is mapped using the identity mapping, unless that mapping would conflict with an existing mapping, in which case it is dropped.

AbiArgumentMapElement(SpecialArgumentKind, SpecialArgumentKind)

Constructs an AbiArgumentMapElement with a zero TargetArgumentOffset.
public AbiArgumentMapElement(SpecialArgumentKind sourceArgument, SpecialArgumentKind targetArgument)

Parameters

sourceArgument SpecialArgumentKind
The source argument kind.
targetArgument SpecialArgumentKind
The target argument kind to map to.