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

◆ Cancel()

override bool System.Net.TimerThread.TimerNode.Cancel ( )
inlinepackage

Definition at line 214 of file TimerThread.cs.

215 {
216 if (_timerState == TimerState.Ready)
217 {
219 {
220 if (_timerState == TimerState.Ready)
221 {
222 Next.Prev = Prev;
223 Prev.Next = Next;
224 Next = null;
225 Prev = null;
226 _callback = null;
227 _context = null;
228 _timerState = TimerState.Cancelled;
229 if (System.Net.NetEventSource.Log.IsEnabled())
230 {
231 System.Net.NetEventSource.Info(this, $"TimerThreadTimer#{base.StartTime} Cancel (success)", "Cancel");
232 }
233 return true;
234 }
235 }
236 }
237 if (System.Net.NetEventSource.Log.IsEnabled())
238 {
239 System.Net.NetEventSource.Info(this, $"TimerThreadTimer#{base.StartTime} Cancel (failure)", "Cancel");
240 }
241 return false;
242 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)

References System.Net.TimerThread.TimerNode._callback, System.Net.TimerThread.TimerNode._context, System.Net.TimerThread.TimerNode._queueLock, System.Net.TimerThread.TimerNode._timerState, System.Net.NetEventSource.Info(), System.Net.NetEventSource.Log, System.Net.TimerThread.TimerNode.Next, and System.Net.TimerThread.TimerNode.Prev.