static public void RestoreFlow ()
{
SecurityContext sc = Thread.CurrentThread.ExecutionContext.SecurityContext;
// if nothing is suppressed then throw
if (!sc.FlowSuppressed && !sc.WindowsIdentityFlowSuppressed)
throw new InvalidOperationException ();
sc.FlowSuppressed = false;
sc.WindowsIdentityFlowSuppressed = false;
}
#if NET_2_0