Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Equals()

override bool System.Delegate.Equals ( [NotNullWhen(true)] object? obj)
inline

Definition at line 69 of file Delegate.cs.

70 {
71 if (obj == null || !InternalEqualTypes(this, obj))
72 {
73 return false;
74 }
76 if (_target == @delegate._target && _methodPtr == @delegate._methodPtr && _methodPtrAux == @delegate._methodPtrAux)
77 {
78 return true;
79 }
80 if (_methodPtrAux == IntPtr.Zero)
81 {
82 if (@delegate._methodPtrAux != IntPtr.Zero)
83 {
84 return false;
85 }
86 if (_target != @delegate._target)
87 {
88 return false;
89 }
90 }
91 else
92 {
93 if (@delegate._methodPtrAux == IntPtr.Zero)
94 {
95 return false;
96 }
97 if (_methodPtrAux == @delegate._methodPtrAux)
98 {
99 return true;
100 }
101 }
102 if (_methodBase == null || @delegate._methodBase == null || !(_methodBase is MethodInfo) || !(@delegate._methodBase is MethodInfo))
103 {
105 }
106 return _methodBase.Equals(@delegate._methodBase);
107 }
IntPtr _methodPtr
Definition Delegate.cs:17
object _target
Definition Delegate.cs:13
static bool InternalEqualMethodHandles(Delegate left, Delegate right)
IntPtr _methodPtrAux
Definition Delegate.cs:19
object _methodBase
Definition Delegate.cs:15
static bool InternalEqualTypes(object a, object b)

References System.Delegate._methodBase, System.Delegate._methodPtr, System.Delegate._methodPtrAux, System.Delegate._target, System.Delegate, System.Runtime.Serialization.Dictionary, System.Delegate.InternalEqualMethodHandles(), System.Delegate.InternalEqualTypes(), System.obj, and System.IntPtr.Zero.