Universal Windows Service Class Library

IMonitor Interface

Interface class for handling all monitors.

For a list of all members of this type, see IMonitor Members.

public interface IMonitor

Types that implement IMonitor

Type Description
CrashMonitor Implementation of a monitor which watches if application(s) exited.
Monitor Abstract class used as basic class for different monitor implementations. Every derived class must conatain a default constructor with no arguments.


This interface capsulate methods controlling all different monitors. It would be implemented by the abstract base monitor class Monitor.

But different monitors could be implemented using this interface to control it's working behaviour. Possible monitor is CrashMonitor.


    // Create an status monitor which watches if an application ends
    IMonitor crashMonitor = new CrashMonitor();
    // Add our callback function to monitor event
    crashMonitor.Event += new MonitorEventHandler(myCallbackFunction);
    if (crashMonitor.Start() == true)
        Console.WriteLine("Monitor was started");
        Console.WriteLine("Could not start monitor");
catch (Exception ex)


Namespace: uws.Monitors

Assembly: uwsCore (in uwsCore.dll)

See Also

IMonitor Members | uws.Monitors Namespace | Monitor | CrashMonitor