WMIEventWatcher Class

A WMI event monitor that notifies about event arrivals for the subscribed event class.

Definition

Namespace: DevCase.Core.Diagnostics.WMI
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public class WMIEventWatcher : ManagementEventWatcher
Inheritance
Object    MarshalByRefObject    Component    ManagementEventWatcher    WMIEventWatcher

Example

This is a code example that demonstrates how to subscribe for drive mount/unmount events.
C#
No code example is currently available or this language may not be supported.

Constructors

WMIEventWatcher(SelectQuery) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(String) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(SelectQuery, Single) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(SelectQuery, TimeSpan) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(SelectQuery, UInt32) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(String, Single) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(String, TimeSpan) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(String, String, Single) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(String, String, TimeSpan) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(String, String, String, TimeSpan) Initializes a new instance of the WMIEventWatcher class.
WMIEventWatcher(String, String, String, UInt32) Initializes a new instance of the WMIEventWatcher class.

Properties

Container Gets the IContainer that contains the Component.
(Inherited from Component)
Options Gets or sets the options used to watch for events.
(Inherited from ManagementEventWatcher)
Query Gets or sets the criteria to apply to events.
(Inherited from ManagementEventWatcher)
Scope Gets or sets the scope in which to watch for events (namespace or scope).
(Inherited from ManagementEventWatcher)
Site Gets or sets the ISite of the Component.
(Inherited from Component)

Methods

CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject)
Dispose Releases all resources used by the Component.
(Inherited from Component)
Equals Determines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCode Serves as the default hash function.
(Inherited from Object)
GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
GetType Gets the Type of the current instance.
(Inherited from Object)
InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject)
Start Subscribes to events with the given query and delivers them, asynchronously, through the EventArrived event.
(Inherited from ManagementEventWatcher)
Stop Cancels the subscription whether it is synchronous or asynchronous.
(Inherited from ManagementEventWatcher)
ToString Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component)
WaitForNextEvent Waits for the next event that matches the specified query to arrive, and then returns it.
(Inherited from ManagementEventWatcher)

Events

Disposed Occurs when the component is disposed by a call to the Dispose method.
(Inherited from Component)
EventArrived Occurs when a new event arrives.
(Inherited from ManagementEventWatcher)
Stopped Occurs when a subscription is canceled.
(Inherited from ManagementEventWatcher)

Extension Methods

CanConvertTo Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
CanConvertToT Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions)
ConvertToT Converts an object to the specified target type.

If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions)

ConvertToT Converts an object to the specified target type.

If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions)

GetEvent Gets a EventInfo that match the specified event name declared in the source Component.
(Defined by ComponentExtensions)
GetEventHandlers Gets all the delegates associated to the specified event raised by the source Component.
(Defined by ComponentExtensions)
GetEvents Gets all the events declared in the source Component.
(Defined by ComponentExtensions)
GetSubscribedEvents Gets a list of events declared in the source Component that are subscribed to a event-handler.
(Defined by ComponentExtensions)
InvokeUITypeEditorT Invokes the default UITypeEditor to edit the specified property.
(Defined by ComponentExtensions)
InvokeUITypeEditorT Invokes the default UITypeEditor to edit the specified property.
(Defined by ComponentExtensions)
IsDisposable Determines whether the specified object is a disposable type (i.e., it implements IDisposable interface).
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
Speak Speaks the string representation of the source object by using the operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions)
ThrowIfNullTException Throws the specified exception if the source object is null.
(Defined by ObjectExtensions)
TryGetEvent Tries to get a EventInfo that match the specified event name declared in the source Component.
(Defined by ComponentExtensions)

See Also