Exemple #1
0
 internal void UndoImpersonationContext()
 {
     if (_impersonationContext != null)
     {
         _impersonationContext.Undo(); _impersonationContext = null;
     }
 }
 internal void RestoreImpersonation()
 {
     // Restore impersonation
     if (ctx != null)
     {
         ctx.Undo();
         ctx = null;
     }
 }
 private void Dispose(bool xiDisposing)
 {
     lock (DisposedSyncRoot)
     {
         try
         {
             if (!Disposed)
             {
                 if (xiDisposing)
                 {
                     if (ImpersonationContext != null)
                     {
                         ImpersonationContext.Undo();
                         ImpersonationContext.Dispose();
                     }
                 }
             }
         }
         finally
         {
             Disposed = true;
         }
     }
 }