Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
AsyncFlowControl.cs
Go to the documentation of this file.
2
3namespace System.Threading;
4
5public struct AsyncFlowControl : IEquatable<AsyncFlowControl>, IDisposable
6{
7 private Thread _thread;
8
9 internal void Initialize(Thread currentThread)
10 {
11 _thread = currentThread;
12 }
13
31
32 public void Dispose()
33 {
34 Undo();
35 }
36
37 public override bool Equals([NotNullWhen(true)] object? obj)
38 {
39 if (obj is AsyncFlowControl obj2)
40 {
41 return Equals(obj2);
42 }
43 return false;
44 }
45
47 {
48 return _thread == obj._thread;
49 }
50
51 public override int GetHashCode()
52 {
53 return _thread?.GetHashCode() ?? 0;
54 }
55
57 {
58 return a.Equals(b);
59 }
60
62 {
63 return !(a == b);
64 }
65}
static string InvalidOperation_CannotUseAFCMultiple
Definition SR.cs:1422
static string InvalidOperation_AsyncFlowCtrlCtxMismatch
Definition SR.cs:1396
static string InvalidOperation_CannotUseAFCOtherThread
Definition SR.cs:1424
Definition SR.cs:7
override int GetHashCode()
Definition Thread.cs:812
static Thread CurrentThread
Definition Thread.cs:312
bool Equals(AsyncFlowControl obj)
void Initialize(Thread currentThread)
static bool operator!=(AsyncFlowControl a, AsyncFlowControl b)
static bool operator==(AsyncFlowControl a, AsyncFlowControl b)
override bool Equals([NotNullWhen(true)] object? obj)