public virtual void Dispose()
 {
     if (UserCredential != null)
     {
         // Delete the test user
         var principalManager =
             new LocalPrincipalManager();
         principalManager.DeleteUser(UserCredential.UserName);
     }
 }
예제 #2
0
 public void Dispose()
 {
     jobObject.Dispose();
     userManager.DeleteUser(username);
     try
     {
         guardProcess.Kill();
     }
     catch (System.InvalidOperationException)
     {
     }
 }
예제 #3
0
        private static void DeleteUser(string userName)
        {
            var principalManager = new LocalPrincipalManager();

            principalManager.DeleteUser(userName);
        }