C# Class rbscan.Helpers.SingleInstance

Inheritance: IDisposable
ファイルを表示 Open project: rbobot/rbscan Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
ListenForArgumentsFromSuccessiveInstances ( ) : void

Listens for arguments being passed from successive instances of the applicaiton.

PassArgumentsToFirstInstance ( string arguments ) : bool

Passes the given arguments to the first running instance of the application.

SingleInstance ( System.Guid identifier ) : System

Enforces single instance for an application.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
CallOnArgumentsReceived ( object state ) : void

Calls the OnArgumentsReceived method casting the state Object to String[].

ListenForArguments ( object state ) : void

Listens for arguments on a named pipe.

OnArgumentsReceived ( string arguments ) : void

Fires the ArgumentsReceived event.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

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

ListenForArgumentsFromSuccessiveInstances() public method

Listens for arguments being passed from successive instances of the applicaiton.
public ListenForArgumentsFromSuccessiveInstances ( ) : void
return void

PassArgumentsToFirstInstance() public method

Passes the given arguments to the first running instance of the application.
public PassArgumentsToFirstInstance ( string arguments ) : bool
arguments string The arguments to pass.
return bool

SingleInstance() public method

Enforces single instance for an application.
public SingleInstance ( System.Guid identifier ) : System
identifier System.Guid An identifier unique to this application.
return System