//
-// System.Threading.AsyncFlowControl structure
+// System.Threading.AsyncFlowControl.cs
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
Security
}
-#if NET_2_0
public struct AsyncFlowControl : IDisposable {
-#else
- internal struct AsyncFlowControl : IDisposable {
-#endif
private Thread _t;
private AsyncFlowControlType _type;
_t = null;
}
- void IDisposable.Dispose ()
+ public void Dispose ()
{
if (_t != null) {
Undo ();
_type = AsyncFlowControlType.None;
}
}
+
+ public override int GetHashCode ()
+ {
+ return(base.GetHashCode ());
+ }
+
+ public override bool Equals (object obj)
+ {
+ if (!(obj is AsyncFlowControl)) {
+ return(false);
+ }
+
+ return(obj.Equals (this));
+ }
+
+ public bool Equals (AsyncFlowControl obj)
+ {
+ if (this._t == obj._t &&
+ this._type == obj._type) {
+ return(true);
+ } else {
+ return(false);
+ }
+ }
+
+ public static bool operator == (AsyncFlowControl a, AsyncFlowControl b)
+ {
+ return a.Equals (b);
+ }
+
+ public static bool operator != (AsyncFlowControl a, AsyncFlowControl b)
+ {
+ return !a.Equals (b);
+ }
}
}