Table of Contents

Class Members

Namespace
Valheim.Testing.Adapter
Assembly
Valheim.Testing.Adapter.CompileCheck.dll

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
object
Members

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

method MethodInfo
instance object
arguments object[]

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

method MethodBase

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

instance object
name string

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

type Type
name string
parameters Type[]

Returns

MethodInfo

StaticField<T>(Type, string)

The value of type's static field name.

public static T StaticField<T>(Type type, string name)

Parameters

type Type
name string

Returns

T

Type Parameters

T