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

◆ AddDelegate()

void System.Runtime.InteropServices.ComEventsMethod.AddDelegate ( Delegate d,
bool wrapArgs = false )
inline

Definition at line 130 of file ComEventsMethod.cs.

131 {
133 {
134 foreach (DelegateWrapper delegateWrapper in _delegateWrappers)
135 {
136 if (delegateWrapper.Delegate.GetType() == d.GetType() && delegateWrapper.WrapArgs == wrapArgs)
137 {
138 delegateWrapper.Delegate = Delegate.Combine(delegateWrapper.Delegate, d);
139 return;
140 }
141 }
142 DelegateWrapper item = new DelegateWrapper(d, wrapArgs);
144 }
145 }
void Add(TKey key, TValue value)
readonly List< DelegateWrapper > _delegateWrappers

References System.Runtime.InteropServices.ComEventsMethod._delegateWrappers, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Delegate.Combine(), and System.item.

Referenced by System.Runtime.InteropServices.ComEventsHelper.Combine().