ProcessSingleton

Ecng.ComponentModel

Provides functionality to ensure that only one instance of the application is running.

Методы

StartIsRunning
public static bool StartIsRunning(string appKey)
result = ProcessSingleton.StartIsRunning(appKey)

Checks whether an instance of the application is already running.

appKey
A unique key used to enforce the single instance.

Возвращает: True if this is the first instance and the mutex was successfully acquired; otherwise, false.

StopIsRunning
public static void StopIsRunning()
ProcessSingleton.StopIsRunning()

Releases all resources allocated by the StartIsRunning method.