Exemplo n.º 1
0
		public void Dispose ()
		{
			if (_t != null) {
				Undo ();
				_t = null;
				_type = AsyncFlowControlType.None;
			}
		}
Exemplo n.º 2
0
		void IDisposable.Dispose () 
		{
			if (_t != null) {
				Undo ();
				_t = null;
				_type = AsyncFlowControlType.None;
			}
		}
Exemplo n.º 3
0
 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;
     }
 }
Exemplo n.º 5
0
 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;
        }
Exemplo n.º 7
0
 internal AsyncFlowControl(Thread t, AsyncFlowControlType type)
 {
     _t    = t;
     _type = type;
 }
Exemplo n.º 8
0
		internal AsyncFlowControl (Thread t, AsyncFlowControlType type)
		{
			_t = t;
			_type = type;
		}
 internal AsyncFlowControl(Thread t, AsyncFlowControlType type)
 {
     this._t    = t;
     this._type = type;
 }