Пример #1
0
 public bool Equals(AsyncFlowControl obj)
 {
     return ((((obj.useEC == this.useEC) && (obj._ec == this._ec)) && (obj._sc == this._sc)) && (obj._thread == this._thread));
 }
 public bool Equals(AsyncFlowControl obj)
 {
     return obj.useEC == useEC && obj._ec == _ec &&
         obj._sc == _sc && obj._thread == _thread;
 }
Пример #3
0
 public bool Equals(AsyncFlowControl obj)
 {
     return _thread == obj._thread;
 }
Пример #4
0
 public bool Equals(AsyncFlowControl obj)
 {
     return(_thread == obj._thread);
 }
Пример #5
0
        public bool Equals(AsyncFlowControl obj)
        {
            return obj.useEC == useEC && obj._ec == _ec &&
#if FEATURE_IMPERSONATION || FEATURE_COMPRESSEDSTACK                            
                obj._sc == _sc && 
#endif // #if FEATURE_IMPERSONATION || FEATURE_COMPRESSEDSTACK
                obj._thread == _thread;
        }
Пример #6
0
        public static AsyncFlowControl SuppressFlow()
        {
            Thread currentThread = Thread.CurrentThread;
            ExecutionContext executionContext = currentThread.ExecutionContext ?? Default;
            if (executionContext.m_isFlowSuppressed)
            {
                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CannotSupressFlowMultipleTimes"));
            }
            Contract.EndContractBlock();

            executionContext = executionContext.ShallowClone(isFlowSuppressed: true);
            var asyncFlowControl = new AsyncFlowControl();
            currentThread.ExecutionContext = executionContext;
            asyncFlowControl.Initialize(currentThread);
            return asyncFlowControl;
        }
Пример #7
0
        internal static AsyncFlowControl SuppressFlow(SecurityContextDisableFlow flags)
        { 
            if (IsFlowSuppressed(flags)) 
            {
                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CannotSupressFlowMultipleTimes")); 
            }

            if (Thread.CurrentThread.ExecutionContext.SecurityContext == null)
                Thread.CurrentThread.ExecutionContext.SecurityContext = new SecurityContext(); 
            AsyncFlowControl afc = new AsyncFlowControl();
            afc.Setup(flags); 
            return afc; 
        }
 /// <summary>Determines whether the specified <see cref="T:System.Threading.AsyncFlowControl" /> structure is equal to the current <see cref="T:System.Threading.AsyncFlowControl" /> structure.</summary>
 /// <returns>true if <paramref name="obj" /> is equal to the current <see cref="T:System.Threading.AsyncFlowControl" /> structure; otherwise, false. </returns>
 /// <param name="obj">An <see cref="T:System.Threading.AsyncFlowControl" /> structure to compare with the current structure.</param>
 public bool Equals(AsyncFlowControl obj)
 {
     return(this._t == obj._t && this._type == obj._type);
 }
Пример #9
0
 public bool Equals(AsyncFlowControl obj)
 {
     return((((obj.useEC == this.useEC) && (obj._ec == this._ec)) && (obj._sc == this._sc)) && (obj._thread == this._thread));
 }
 public bool Equals(AsyncFlowControl obj)
 {
     return(default(bool));
 }
Пример #11
0
		public bool Equals (AsyncFlowControl obj)
		{
			if (this._t == obj._t &&
			    this._type == obj._type) {
				return(true);
			} else {
				return(false);
			}
		}
Пример #12
0
 /// <summary>Determines whether the specified <see cref="T:System.Threading.AsyncFlowControl" /> structure is equal to the current <see cref="T:System.Threading.AsyncFlowControl" /> structure.</summary><returns>true if <paramref name="obj" /> is equal to the current <see cref="T:System.Threading.AsyncFlowControl" /> structure; otherwise, false.</returns><param name="obj">An <see cref="T:System.Threading.AsyncFlowControl" /> structure to compare with the current structure.</param>
 public bool Equals(AsyncFlowControl obj)
 {
     throw new NotImplementedException();
 }
 public bool Equals(AsyncFlowControl obj)
 {
   return default(bool);
 }
 public static AsyncFlowControl SuppressFlow()
 {
     if (IsFlowSuppressed())
     {
         throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CannotSupressFlowMultipleTimes"));
     }
     AsyncFlowControl afc = new AsyncFlowControl();
     afc.Setup();
     return afc;
 }
 /// <summary>Determines whether the specified <see cref="T:System.Threading.AsyncFlowControl" /> structure is equal to the current <see cref="T:System.Threading.AsyncFlowControl" /> structure.</summary>
 /// <param name="obj">An <see cref="T:System.Threading.AsyncFlowControl" /> structure to compare with the current structure.</param>
 /// <returns>
 ///     <see langword="true" /> if <paramref name="obj" /> is equal to the current <see cref="T:System.Threading.AsyncFlowControl" /> structure; otherwise, <see langword="false" />.</returns>
 // Token: 0x06003AD3 RID: 15059 RVA: 0x000DEA14 File Offset: 0x000DCC14
 public bool Equals(AsyncFlowControl obj)
 {
     return(obj.useEC == this.useEC && obj._ec == this._ec && obj._sc == this._sc && obj._thread == this._thread);
 }
Пример #16
0
        internal static AsyncFlowControl SuppressFlow(SecurityContextDisableFlow flags)
        {
#if MOBILE
            throw new NotSupportedException ();
#else
            if (IsFlowSuppressed(flags))
            {
                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CannotSupressFlowMultipleTimes"));
            }

            ExecutionContext ec = Thread.CurrentThread.GetMutableExecutionContext();
            if (ec.SecurityContext == null)
                ec.SecurityContext = new SecurityContext();
            AsyncFlowControl afc = new AsyncFlowControl();
            afc.Setup(flags);
            return afc;
#endif
        }
Пример #17
0
 public bool Equals(AsyncFlowControl obj)
 {
     return _thread == obj._thread && _executionContext == obj._executionContext;
 }