Class InjectAt.Invoke
Targets a named method or property call inside the target body. Head and Tail also target field reads.
public sealed record InjectAt.Invoke : InjectAt, IEquatable<InjectAt>, IEquatable<InjectAt.Invoke>
- Inheritance
-
InjectAt.Invoke
- Implements
- Inherited Members
Constructors
Invoke(Type, string, At, uint, Type[]?, uint)
Targets a named method or property call inside the target body. Head and Tail also target field reads.
public Invoke(Type DeclaringType, string Method, At Shift, uint By = 0, Type[]? ParameterTypes = null, uint Arg = 0)
Parameters
DeclaringTypeTypeThe declaring type of the member access to match.
MethodstringThe method, property, or field name to match.
ShiftAtWhere the injection method runs relative to the matched access: Head before it, Tail after it, or Around wrapping a method or property call. Field reads support Head and Tail only.
ByuintThe 1-based occurrence of the matched access to target, or
0to target every matching access.ParameterTypesType[]For method or property calls, restricts matches by parameter types. Leave this null or empty when matching a field read.
ArguintThe 1-based argument to rewrite for At.Argument, or 0 to infer by unique type match.
Properties
Arg
The 1-based 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 of the matched access to target, or 0 to target every matching access.
public uint By { get; init; }
Property Value
DeclaringType
The declaring type of the member access to match.
public Type DeclaringType { get; init; }
Property Value
Method
The method, property, or field name to match.
public string Method { get; init; }
Property Value
ParameterTypes
For method or property calls, restricts matches by parameter types. Leave this null or empty when matching a field read.
public Type[]? ParameterTypes { get; init; }
Property Value
- Type[]
Shift
Where the injection method runs relative to the matched access: Head before it, Tail after it, or Around wrapping a method or property call. Field reads support Head and Tail only.
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; }