GSF.Identity.UserInfo.EndImpersonation C# (CSharp) Method

EndImpersonation() public static method

Ends the impersonation of the specified user.
public static EndImpersonation ( System.Security.Principal.WindowsImpersonationContext impersonatedUser ) : void
impersonatedUser System.Security.Principal.WindowsImpersonationContext of the impersonated user.
return void
        public static void EndImpersonation(WindowsImpersonationContext impersonatedUser)
        {
            if ((object)impersonatedUser != null)
            {
                impersonatedUser.Undo();
                impersonatedUser.Dispose();
            }
        }