C# Class Dev2.Impersonator

Inheritance: IDisposable
显示文件 Open project: Warewolf-ESB/Warewolf Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
Impersonate ( string userName, string domain, string password ) : bool
RunAs ( string userName, string domain, string password, System.Action action ) : bool
Undo ( ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
CloseHandle ( IntPtr handle ) : bool
DuplicateToken ( IntPtr hToken, int impersonationLevel, IntPtr &hNewToken ) : int
LogonUser ( string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, IntPtr &phToken ) : bool
RevertToSelf ( ) : bool

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

Impersonate() public method

public Impersonate ( string userName, string domain, string password ) : bool
userName string
domain string
password string
return bool

RunAs() public static method

public static RunAs ( string userName, string domain, string password, System.Action action ) : bool
userName string
domain string
password string
action System.Action
return bool

Undo() public method

public Undo ( ) : void
return void