Returns a PnpObjectWatcher object that is used to enumerate the PnP objects in the collection using events.
var pnpObjectWatcher = Windows.Devices.Enumeration.Pnp.PnpObject.createWatcher(type, requestedProperties);
public static PnpObjectWatcher CreateWatcher( PnpObjectType type, IEnumerable<string> requestedProperties )
Public Shared Function CreateWatcher( type As PnpObjectType, requestedProperties As IEnumerable(Of String) ) As PnpObjectWatcher
public: static PnpObjectWatcher^ CreateWatcher( PnpObjectType type, IIterable<String^>^ requestedProperties )
The type of the PnpObject.
An iterable list of additional properties to include in the Properties property of the PnpObject objects included in enumeration results. For more info on what the properties represent, see the list of properties in How to retrieve additional properties for a device or PnP object.
A PnpObjectWatcher object used to enumerate the collection by registering event notification delegates and by issuing start and stop event notifications.
CreateWatcher is a primary starting point method for enumerating device objects. A client should use this API to enumerate PnpObjects if they want the enumeration to happen incrementally, or if they want the results to be updated as things change. For example, if a PnpObject is added, removed or its properties are updated, the client will register event handlers with the returned watcher object to receive the enumerated PnpObject as well as the later updates.
Minimum supported client
Minimum supported server
|Windows Server 2012|
- CreateWatcher(PnpObjectType, IIterable_1, String)
- How to retrieve additional properties for a device or PnP object
Build date: 11/16/2013