Class Members
Exact reflected access to game members that the shipped game keeps private, even where publicized build references show them as public. Every lookup names one member (a method by its exact parameter types) and throws when it is missing or has another type, so a game update fails the test loudly instead of reading a default.
public static class Members
- Inheritance
-
objectMembers
Methods
Call(MethodInfo, object?, params object?[])
Invokes method and rethrows what it threw, not reflection's wrapper.
public static object? Call(MethodInfo method, object? instance, params object?[] arguments)
Parameters
methodMethodInfoinstanceobjectargumentsobject[]
Returns
- object
Describe(MethodBase)
A method's identity as the Harmony census reports it: DeclaringType::Name(ParameterType,...), types as
System.Type.ToString() writes them (a nested type as Outer+Inner).
public static string Describe(MethodBase method)
Parameters
methodMethodBase
Returns
- string
Field<T>(object, string)
The value of instance's field name (declared on its type or a base type).
public static T Field<T>(object instance, string name)
Parameters
instanceobjectnamestring
Returns
- T
Type Parameters
T
Method(Type, string, params Type[])
The method name declared on type or, nearest first, a base type (private ones
included) with exactly these parameter types. Overloads never match by name alone, and a parameter the arguments
would only widen to (a short for an int) does not match.
public static MethodInfo Method(Type type, string name, params Type[] parameters)
Parameters
typeTypenamestringparametersType[]
Returns
- MethodInfo
StaticField<T>(Type, string)
The value of type's static field name.
public static T StaticField<T>(Type type, string name)
Parameters
typeTypenamestring
Returns
- T
Type Parameters
T