Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RuntimeFieldHandle.cs
Go to the documentation of this file.
5
6namespace System;
7
10{
11 private readonly IRuntimeFieldInfo m_ptr;
12
14 {
15 get
16 {
17 if (m_ptr == null)
18 {
19 return IntPtr.Zero;
20 }
21 return m_ptr.Value.Value;
22 }
23 }
24
29
31 {
32 return m_ptr;
33 }
34
35 internal bool IsNullHandle()
36 {
37 return m_ptr == null;
38 }
39
40 public override int GetHashCode()
41 {
43 }
44
45 public override bool Equals(object? obj)
46 {
48 {
49 return false;
50 }
52 }
53
55 {
56 return handle.Value == Value;
57 }
58
59 public static bool operator ==(RuntimeFieldHandle left, RuntimeFieldHandle right)
60 {
61 return left.Equals(right);
62 }
63
64 public static bool operator !=(RuntimeFieldHandle left, RuntimeFieldHandle right)
65 {
66 return !left.Equals(right);
67 }
68
69 [MethodImpl(MethodImplOptions.InternalCall)]
70 internal static extern string GetName(RtFieldInfo field);
71
72 [MethodImpl(MethodImplOptions.InternalCall)]
73 private unsafe static extern void* _GetUtf8Name(RuntimeFieldHandleInternal field);
74
76 {
77 return new MdUtf8String(_GetUtf8Name(field));
78 }
79
80 [MethodImpl(MethodImplOptions.InternalCall)]
81 internal static extern bool MatchesNameHash(RuntimeFieldHandleInternal handle, uint hash);
82
83 [MethodImpl(MethodImplOptions.InternalCall)]
85
86 [MethodImpl(MethodImplOptions.InternalCall)]
88
95
96 [MethodImpl(MethodImplOptions.InternalCall)]
97 internal static extern int GetToken(RtFieldInfo field);
98
99 [MethodImpl(MethodImplOptions.InternalCall)]
100 internal static extern object GetValue(RtFieldInfo field, object instance, RuntimeType fieldType, RuntimeType declaringType, ref bool domainInitialized);
101
102 [MethodImpl(MethodImplOptions.InternalCall)]
104
105 [MethodImpl(MethodImplOptions.InternalCall)]
107
108 [MethodImpl(MethodImplOptions.InternalCall)]
109 internal unsafe static extern void SetValueDirect(RtFieldInfo field, RuntimeType fieldType, void* pTypedRef, object value, RuntimeType contextType);
110
111 [MethodImpl(MethodImplOptions.InternalCall)]
113
114 [MethodImpl(MethodImplOptions.InternalCall)]
116
118 {
120 }
121}
static void KeepAlive(object? obj)
Definition GC.cs:180
Definition GC.cs:8
static int GetHashCodeOfPtr(IntPtr ptr)
RuntimeFieldHandleInternal Value
static readonly IntPtr Zero
Definition IntPtr.cs:18
static RuntimeType GetApproxDeclaringType(RuntimeFieldHandleInternal field)
override bool Equals(object? obj)
static unsafe object GetValueDirect(RtFieldInfo field, RuntimeType fieldType, void *pTypedRef, RuntimeType contextType)
static RuntimeType GetApproxDeclaringType(IRuntimeFieldInfo field)
static unsafe void * _GetUtf8Name(RuntimeFieldHandleInternal field)
static void SetValue(RtFieldInfo field, object obj, object value, RuntimeType fieldType, FieldAttributes fieldAttr, RuntimeType declaringType, ref bool domainInitialized)
RuntimeFieldHandle(IRuntimeFieldInfo fieldInfo)
readonly IRuntimeFieldInfo m_ptr
void GetObjectData(SerializationInfo info, StreamingContext context)
bool Equals(RuntimeFieldHandle handle)
static bool MatchesNameHash(RuntimeFieldHandleInternal handle, uint hash)
static bool operator!=(RuntimeFieldHandle left, RuntimeFieldHandle right)
static FieldAttributes GetAttributes(RuntimeFieldHandleInternal field)
static bool AcquiresContextFromThis(RuntimeFieldHandleInternal field)
static bool operator==(RuntimeFieldHandle left, RuntimeFieldHandle right)
static unsafe void SetValueDirect(RtFieldInfo field, RuntimeType fieldType, void *pTypedRef, object value, RuntimeType contextType)
static object GetValue(RtFieldInfo field, object instance, RuntimeType fieldType, RuntimeType declaringType, ref bool domainInitialized)
IRuntimeFieldInfo GetRuntimeFieldInfo()
static unsafe MdUtf8String GetUtf8Name(RuntimeFieldHandleInternal field)
static RuntimeFieldHandleInternal GetStaticFieldForGenericType(RuntimeFieldHandleInternal field, RuntimeType declaringType)
static string GetName(RtFieldInfo field)
static int GetToken(RtFieldInfo field)