跳到主要内容
版本:0.2.1

Class HarmonyTargetMethodHint

Namespace: PreludeLib.Attributes
Assembly: PreludeLib.dll

When declaring a TargetMethod method in your patch class, you must decorate it with this attribute.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class HarmonyTargetMethodHint : Attribute

Inheritance

objectAttributeHarmonyTargetMethodHint

Inherited Members

Attribute.GetCustomAttributes(MemberInfo, Type), Attribute.GetCustomAttributes(MemberInfo, Type, bool), Attribute.GetCustomAttributes(MemberInfo), Attribute.GetCustomAttributes(MemberInfo, bool), Attribute.IsDefined(MemberInfo, Type), Attribute.IsDefined(MemberInfo, Type, bool), Attribute.GetCustomAttribute(MemberInfo, Type), Attribute.GetCustomAttribute(MemberInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo), Attribute.GetCustomAttributes(ParameterInfo, Type), Attribute.GetCustomAttributes(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo, bool), Attribute.IsDefined(ParameterInfo, Type), Attribute.IsDefined(ParameterInfo, Type, bool), Attribute.GetCustomAttribute(ParameterInfo, Type), Attribute.GetCustomAttribute(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(Module, Type), Attribute.GetCustomAttributes(Module), Attribute.GetCustomAttributes(Module, bool), Attribute.GetCustomAttributes(Module, Type, bool), Attribute.IsDefined(Module, Type), Attribute.IsDefined(Module, Type, bool), Attribute.GetCustomAttribute(Module, Type), Attribute.GetCustomAttribute(Module, Type, bool), Attribute.GetCustomAttributes(Assembly, Type), Attribute.GetCustomAttributes(Assembly, Type, bool), Attribute.GetCustomAttributes(Assembly), Attribute.GetCustomAttributes(Assembly, bool), Attribute.IsDefined(Assembly, Type), Attribute.IsDefined(Assembly, Type, bool), Attribute.GetCustomAttribute(Assembly, Type), Attribute.GetCustomAttribute(Assembly, Type, bool), Attribute.Equals(object?), Attribute.GetHashCode(), Attribute.Match(object?), Attribute.IsDefaultAttribute(), Attribute.TypeId, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

HarmonyTargetMethodHint(string, params Type[])

Use this constructor when the HarmonyPatch attribute on the patch class already specifies the declaring type.

public HarmonyTargetMethodHint(string methodName, params Type[] args)

Parameters

methodName string

Name of the target method.

args Type[]

Types of the target method parameters, in order. Use an empty array for parameterless methods.

HarmonyTargetMethodHint(Type, string, params Type[])

The declaring type can be specified as a Type to allow for compile-time checking of the target method's existence and signature. However, this creates a hard reference to the assembly containing the target method, which may not be desirable in all cases.

public HarmonyTargetMethodHint(Type declaringType, string methodName, params Type[] args)

Parameters

declaringType Type

Fully qualified name of the declaring type, including namespace.

methodName string

Name of the target method.

args Type[]

Types of the target method parameters, in order. Use an empty array for parameterless methods.

HarmonyTargetMethodHint(string, string, params Type[])

The declaring type can be specified as a string to avoid hard references to the assembly containing the target method.

public HarmonyTargetMethodHint(string declaringType, string methodName, params Type[] args)

Parameters

declaringType string

Fully qualified name of the declaring type, including namespace.

methodName string

Name of the target method.

args Type[]

Types of the target method parameters, in order. Use an empty array for parameterless methods.

  • Constructors
    • HarmonyTargetMethodHint(string, params Type[])
    • HarmonyTargetMethodHint(Type, string, params Type[])
    • HarmonyTargetMethodHint(string, string, params Type[])