Esempio n. 1
0
 /// <summary>
 /// Revert impersonation back to the current user.
 /// </summary>
 public void Revert()
 {
     try
     {
         _thread.SetImpersonationToken(null);
         _thread.Dispose();
         _thread = null;
     }
     catch
     {
     }
 }
 /// <summary>
 /// Revert impersonation back to the current user.
 /// </summary>
 public void Revert()
 {
     if (_thread != null)
     {
         try
         {
             _thread.SetImpersonationToken(null);
         }
         catch
         {
         }
         finally
         {
             _thread.Dispose();
             _thread = null;
         }
     }
 }