System.Security.Principal.WindowsImpersonationContext.WindowsImpersonationContext.WindowsImpersonationContext C# (CSharp) Method

WindowsImpersonationContext() private method

private WindowsImpersonationContext ( IntPtr token ) : System.Runtime.CompilerServices
token IntPtr
return System.Runtime.CompilerServices
		internal WindowsImpersonationContext (IntPtr token)
		{
			// we get a copy to control it's lifetime
			_token = DuplicateToken (token);
			if (!SetCurrentToken (token)) {
				throw new SecurityException ("Couldn't impersonate token.");
			}
			undo = false;
		}
#if NET_2_0