System.Threading.AsyncFlowControl.Setup C# (CSharp) Méthode

Setup() private méthode

private Setup ( SecurityContextDisableFlow flags ) : void
flags SecurityContextDisableFlow
Résultat void
        internal void Setup(SecurityContextDisableFlow flags)
        {
            useEC = false;
            _sc = Thread.CurrentThread.ExecutionContext.SecurityContext;
            _sc._disableFlow = flags;
            _thread = Thread.CurrentThread;
        }
        internal void Setup()

Same methods

AsyncFlowControl::Setup ( ) : void

Usage Example

 public static AsyncFlowControl SuppressFlow()
 {
     if (IsFlowSuppressed())
     {
         throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CannotSupressFlowMultipleTimes"));
     }
     AsyncFlowControl afc = new AsyncFlowControl();
     afc.Setup();
     return afc;
 }
All Usage Examples Of System.Threading.AsyncFlowControl::Setup