System.Security.SecurityContext.SecurityContext.SuppressFlow C# (CSharp) Method

SuppressFlow() private method

private SuppressFlow ( ) : AsyncFlowControl
return System.Threading.AsyncFlowControl
		static public AsyncFlowControl SuppressFlow ()
		{
			Thread t = Thread.CurrentThread;
			// suppress both flows
			t.ExecutionContext.SecurityContext.FlowSuppressed = true;
			t.ExecutionContext.SecurityContext.WindowsIdentityFlowSuppressed = true;
			return new AsyncFlowControl (t, AsyncFlowControlType.Security);
		}