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