public void Dispose () { if (_t != null) { Undo (); _t = null; _type = AsyncFlowControlType.None; } }
void IDisposable.Dispose () { if (_t != null) { Undo (); _t = null; _type = AsyncFlowControlType.None; } }
void IDisposable.Dispose() { if (_t != null) { Undo(); _t = null; _type = AsyncFlowControlType.None; } }
/// <summary>Releases all resources used by the <see cref="T:System.Threading.AsyncFlowControl" />.</summary> void IDisposable.Dispose() { if (this._t != null) { this.Undo(); this._t = null; this._type = AsyncFlowControlType.None; } }
public void Dispose() { if (_t != null) { Undo(); _t = null; _type = AsyncFlowControlType.None; } }
/// <summary>Restores the flow of the execution context between threads.</summary> /// <exception cref="T:System.InvalidOperationException">The <see cref="T:System.Threading.AsyncFlowControl" /> structure is not used on the thread where it was created.-or-The <see cref="T:System.Threading.AsyncFlowControl" /> structure has already been used to call <see cref="M:System.Threading.AsyncFlowControl.Undo" />.</exception> /// <filterpriority>2</filterpriority> public void Undo() { if (this._t == null) { throw new InvalidOperationException(Locale.GetText("Can only be called once.")); } AsyncFlowControlType type = this._type; if (type != AsyncFlowControlType.Execution) { if (type == AsyncFlowControlType.Security) { SecurityContext.RestoreFlow(); } } else { ExecutionContext.RestoreFlow(); } this._t = null; }
internal AsyncFlowControl(Thread t, AsyncFlowControlType type) { _t = t; _type = type; }
internal AsyncFlowControl (Thread t, AsyncFlowControlType type) { _t = t; _type = type; }
internal AsyncFlowControl(Thread t, AsyncFlowControlType type) { this._t = t; this._type = type; }