Pnp​Object Pnp​Object Pnp​Object Class

Definition

Represents a PnP object. This class allows access to well-known properties of a PnP object as well as a property store of additional properties that are specified to be retrieved from the the PnP object.

public : sealed class PnpObject : IPnpObjectpublic sealed class PnpObject : IPnpObjectPublic NotInheritable Class PnpObject Implements IPnpObject
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Id Id Id

A string representing the identity of the PnpObject.

public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string
Value
PlatForm::String string string

The identity string.

Attributes

Properties Properties Properties

A property store containing well-known values as well as additional specified properties.

public : IMapView<string, object> Properties { get; }public IReadOnlyDictionary<string, object> Properties { get; }Public ReadOnly Property Properties As IReadOnlyDictionary<string, object>
Value
IMapView<PlatForm::String, PlatForm::Object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object>

A pointer to the property store.

Attributes

Remarks

For more info on what the properties represent, see Device information properties.

Type Type Type

The type of the PnpObject.

public : PnpObjectType Type { get; }public PnpObjectType Type { get; }Public ReadOnly Property Type As PnpObjectType
Value
PnpObjectType PnpObjectType PnpObjectType

The type of the object.

Attributes

Methods

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

Creates a PnpObject object asynchronously from a previously saved DeviceInformation ID.

public : static IAsyncOperation<PnpObject> CreateFromIdAsync(PnpObjectType type, PlatForm::String id, IIterable<PlatForm::String> requestedProperties)public static IAsyncOperation<PnpObject> CreateFromIdAsync(PnpObjectType type, String id, IEnumerable<String> requestedProperties)Public Static Function CreateFromIdAsync(type As PnpObjectType, id As String, requestedProperties As IEnumerable<String>) As IAsyncOperation( Of PnpObject )
Parameters
id
PlatForm::String String String

The string value identifying the PnpObject.

requestedProperties
IIterable<PlatForm::String> IEnumerable<String> IEnumerable<String>

An iterable list of additional properties to include in the Properties property of the PnpObject object to create. For more info on what the properties represent, see Device information properties.

Returns
Attributes

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)public static PnpObjectWatcher CreateWatcher(PnpObjectType type, IEnumerable<String> requestedProperties)Public Static Function CreateWatcher(type As PnpObjectType, requestedProperties As IEnumerable<String>) As PnpObjectWatcher
Parameters
requestedProperties
IIterable<PlatForm::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.

Attributes

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)

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)public static PnpObjectWatcher CreateWatcher(PnpObjectType type, IEnumerable<String> requestedProperties, String aqsFilter)Public Static Function CreateWatcher(type As PnpObjectType, requestedProperties As IEnumerable<String>, aqsFilter As String) As PnpObjectWatcher
Parameters
requestedProperties
IIterable<PlatForm::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
PlatForm::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.

Attributes
See Also

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

Returns all of the PnP objects of a specified type that match the specified criteria.

public : static IAsyncOperation<PnpObjectCollection> FindAllAsync(PnpObjectType type, IIterable<PlatForm::String> requestedProperties)public static IAsyncOperation<PnpObjectCollection> FindAllAsync(PnpObjectType type, IEnumerable<String> requestedProperties)Public Static Function FindAllAsync(type As PnpObjectType, requestedProperties As IEnumerable<String>) As IAsyncOperation( Of PnpObjectCollection )
Parameters
requestedProperties
IIterable<PlatForm::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
Attributes
See Also

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

Returns all of the PnP objects of a specified type that match the specified filter.

public : static IAsyncOperation<PnpObjectCollection> FindAllAsync(PnpObjectType type, IIterable<PlatForm::String> requestedProperties, PlatForm::String aqsFilter)public static IAsyncOperation<PnpObjectCollection> FindAllAsync(PnpObjectType type, IEnumerable<String> requestedProperties, String aqsFilter)Public Static Function FindAllAsync(type As PnpObjectType, requestedProperties As IEnumerable<String>, aqsFilter As String) As IAsyncOperation( Of PnpObjectCollection )
Parameters
requestedProperties
IIterable<PlatForm::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
PlatForm::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
Attributes
See Also

Update(PnpObjectUpdate) Update(PnpObjectUpdate) Update(PnpObjectUpdate)

Updates the properties of an existing PnpObject by applying the changes described in a PnpObjectUpdate object.

public : void Update(PnpObjectUpdate updateInfo)public void Update(PnpObjectUpdate updateInfo)Public Function Update(updateInfo As PnpObjectUpdate) As void
Parameters
updateInfo
PnpObjectUpdate PnpObjectUpdate PnpObjectUpdate

Indicates the properties to update.

Attributes
See Also