PnpObject
PnpObject
PnpObject
PnpObject
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// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
Id 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// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The identity string.
Properties 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>// You can use this property in JavaScript.
- Value
- IMapView<PlatForm::String, PlatForm::Object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object>
A pointer to the property store.
Remarks
For more info on what the properties represent, see Device information properties.
Type Type Type Type
The type of the PnpObject.
public : PnpObjectType Type { get; }public PnpObjectType Type { get; }Public ReadOnly Property Type As PnpObjectType// You can use this property in JavaScript.
The type of the object.
Methods
CreateFromIdAsync(PnpObjectType, String, IIterable)
CreateFromIdAsync(PnpObjectType, String, IIterable)
CreateFromIdAsync(PnpObjectType, String, IIterable)
CreateFromIdAsync(PnpObjectType, String, IIterable)
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 )// You can use this method in JavaScript.
The type of the PnpObject.
- id
- PlatForm::String String String String
The string value identifying the PnpObject.
- requestedProperties
- IIterable<PlatForm::String> IEnumerable<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.
The PnpObject created from the previously saved DeviceInformation ID.
CreateWatcher(PnpObjectType, IIterable)
CreateWatcher(PnpObjectType, IIterable)
CreateWatcher(PnpObjectType, IIterable)
CreateWatcher(PnpObjectType, IIterable)
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// You can use this method in JavaScript.
The type of the PnpObject.
- requestedProperties
- IIterable<PlatForm::String> 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.
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)
CreateWatcher(PnpObjectType, IIterable, String)
CreateWatcher(PnpObjectType, IIterable, String)
CreateWatcher(PnpObjectType, IIterable, 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// You can use this method in JavaScript.
The type of the PnpObject.
- requestedProperties
- IIterable<PlatForm::String> 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
- PlatForm::String 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.
A PnpObjectWatcher object used to enumerate the collection by registering event notification delegates and by issuing start and stop event notifications.
- See Also
FindAllAsync(PnpObjectType, IIterable)
FindAllAsync(PnpObjectType, IIterable)
FindAllAsync(PnpObjectType, IIterable)
FindAllAsync(PnpObjectType, IIterable)
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 )// You can use this method in JavaScript.
The type of the PnpObject.
- requestedProperties
- IIterable<PlatForm::String> 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.
An object that represents the asynchronous operation.
- See Also
FindAllAsync(PnpObjectType, IIterable, String)
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 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 )// You can use this method in JavaScript.
The type of the PnpObject.
- requestedProperties
- IIterable<PlatForm::String> 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
- PlatForm::String 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.
An object that represents the asynchronous operation.
- See Also
Update(PnpObjectUpdate) 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// You can use this method in JavaScript.
Indicates the properties to update.
- See Also