Class InjectAt.NewObj
Targets a newobj instruction inside the target body.
public sealed record InjectAt.NewObj : InjectAt, IEquatable<InjectAt>, IEquatable<InjectAt.NewObj>
- Inheritance
-
InjectAt.NewObj
- Implements
- Inherited Members
Constructors
NewObj(Type, At, uint, Type[]?, uint)
Targets a newobj instruction inside the target body.
public NewObj(Type ConstructedType, At Shift, uint By = 0, Type[]? ParameterTypes = null, uint Arg = 0)
Parameters
ConstructedTypeTypeThe type being constructed.
ShiftAtWhere the injection method runs relative to the construction.
ByuintThe 1-based occurrence to target, or
0to target every match.ParameterTypesType[]Restricts matches to one constructor overload by parameter types.
ArguintThe 1-based constructor argument to rewrite for At.Argument, or 0 to infer by unique type match.
Properties
Arg
The 1-based constructor argument to rewrite for At.Argument, or 0 to infer by unique type match.
public uint Arg { get; init; }
Property Value
By
The 1-based occurrence to target, or 0 to target every match.
public uint By { get; init; }
Property Value
ConstructedType
The type being constructed.
public Type ConstructedType { get; init; }
Property Value
ParameterTypes
Restricts matches to one constructor overload by parameter types.
public Type[]? ParameterTypes { get; init; }
Property Value
- Type[]
Shift
Where the injection method runs relative to the construction.
public At Shift { get; init; }
Property Value
Slice
Bounds matching and By counting to a range of the target body.
public SliceRange? Slice { get; init; }