Back to Harmony

Delegate AccessTools.StructFieldRef<T, F>

docs/api/HarmonyLib.AccessTools.StructFieldRef-2.html

2.4.2.02.2 KB
Original Source

Delegate AccessTools.StructFieldRef<T, F>

A readable/assignable reference delegate to an instance field of a struct

Namespace : HarmonyLib
Assembly : 0Harmony.dll
Syntax
public delegate F StructFieldRef<T, F>(ref T instance)
    where T : struct;
Parameters
TypeNameDescription
Tinstance

A reference to the runtime instance to access the field

|

Returns
TypeDescription
F

A readable/assignable reference to the field

|

Type Parameters
NameDescription
T

The struct that defines the instance field

| | F |

The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), a type that System.Type.IsAssignableFrom(System.Type) that type; or if the field's type is an enum type, either that type or the underlying integral type of that enum type

|

Constructors

StructFieldRef(Object, IntPtr)

Declaration
public StructFieldRef(object object, IntPtr method)
Parameters
TypeNameDescription
System.Objectobject
System.IntPtrmethod

Methods

BeginInvoke(ref T, AsyncCallback, Object)

Declaration
public virtual IAsyncResult BeginInvoke(ref T instance, AsyncCallback callback, object object)
Parameters
TypeNameDescription
Tinstance
System.AsyncCallbackcallback
System.Objectobject
Returns
TypeDescription
System.IAsyncResult

EndInvoke(ref T, IAsyncResult)

Declaration
public virtual F EndInvoke(ref T instance, IAsyncResult result)
Parameters
TypeNameDescription
Tinstance
System.IAsyncResultresult
Returns
TypeDescription
F

Invoke(ref T)

Declaration
public virtual F Invoke(ref T instance)
Parameters
TypeNameDescription
Tinstance
Returns
TypeDescription
F