PnpObject.CreateWatcher PnpObject.CreateWatcher PnpObject.CreateWatcher PnpObject.CreateWatcher PnpObject.CreateWatcher Method

Definition

Overloads

CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>)

Returns a PnpObjectWatcher object that is used to enumerate the PnP objects in the collection using events.

CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String)

Returns a PnpObjectWatcher object that is used to enumerate a filtered collection of PnP objects using events.

CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>) CreateWatcher(PnpObjectType, IIterable<String>)

Returns a PnpObjectWatcher object that is used to enumerate the PnP objects in the collection using events.

public : static PnpObjectWatcher CreateWatcher(PnpObjectType type, IIterable<Platform::String> requestedProperties)
static PnpObjectWatcher CreateWatcher(PnpObjectType type, IIterable<winrt::hstring> requestedProperties) const;
public static PnpObjectWatcher CreateWatcher(PnpObjectType type, IEnumerable<String> requestedProperties)
Public Shared Function CreateWatcher(type As PnpObjectType, requestedProperties As IEnumerable(Of String)) As PnpObjectWatcher
var pnpObjectWatcher = Windows.Devices.Enumeration.Pnp.PnpObject.createWatcher(type, requestedProperties);

Parameters

requestedProperties
IEnumerable<String> IEnumerable<String> IEnumerable<String>

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 Device information properties.

Returns

A PnpObjectWatcher object used to enumerate the collection by registering event notification delegates and by issuing start and stop event notifications.

Remarks

CreateWatcher is a primary starting point method for enumerating device objects. A client should use this API to enumerate PnpObject s 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.

See also

CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String) CreateWatcher(PnpObjectType, IIterable<String>, String)

Returns a PnpObjectWatcher object that is used to enumerate a filtered collection of PnP objects using events.

public : static PnpObjectWatcher CreateWatcher(PnpObjectType type, IIterable<Platform::String> requestedProperties, Platform::String aqsFilter)
static PnpObjectWatcher CreateWatcher(PnpObjectType type, IIterable<winrt::hstring> requestedProperties, winrt::hstring aqsFilter) const;
public static PnpObjectWatcher CreateWatcher(PnpObjectType type, IEnumerable<String> requestedProperties, String aqsFilter)
Public Shared Function CreateWatcher(type As PnpObjectType, requestedProperties As IEnumerable(Of String), aqsFilter As String) As PnpObjectWatcher
var pnpObjectWatcher = Windows.Devices.Enumeration.Pnp.PnpObject.createWatcher(type, requestedProperties, aqsFilter);

Parameters

requestedProperties
IEnumerable<String> IEnumerable<String> IEnumerable<String>

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 Device information properties.

aqsFilter
String String String

An AQS string that filters the PnP objects that will be returned. Typically, this string is retrieved from the method of a class that interacts with devices.

Returns

A PnpObjectWatcher object used to enumerate the collection by registering event notification delegates and by issuing start and stop event notifications.

See also