RemoteSystemWatcher Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Watches for activity related to the discovery of remote systems and raises the appropriate events.
public ref class RemoteSystemWatcher sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RemoteSystemWatcher final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RemoteSystemWatcher
Public NotInheritable Class RemoteSystemWatcher
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|
App capabilities |
remoteSystem
|
Remarks
This class is instantiated when the static method CreateWatcher is called. Objects of this class begin watching activity when the Start method is called and stop when Stop is called, when the app exits or is suspended by the system, or if an error occurs.
Important
You must confirm access to the remote system platform with a call to RemoteSystem.RequestAccessAsync before you instantiate this class.
Version history
Windows version | SDK version | Value added |
---|---|---|
1803 | 17134 | EnumerationCompleted |
1803 | 17134 | ErrorOccurred |
1903 | 18362 | User |
Properties
User |
Represents the User that the RemoteSystemWatcher intends to see devices for. |
Methods
Start() |
Starts watching for discoverable remote systems. The discovery process runs until the Stop method is called or an error occurs. A RemoteSystemWatcher object can have its Start method called again at a later time. |
Stop() |
Stops watching for discoverable remote systems. |
Events
EnumerationCompleted |
This event is raised when the initial remote system discovery process completes. |
ErrorOccurred |
This event is raised when an error occurs during discovery. The discovery process will continue if possible. For example, if the error occurs with a value of RemoteSystemWatcherError.InternetNotAvailable (see RemoteSystemWatcherError), proximal discovery will continue because the error applies only to cloud discovery (see RemoteSystemDiscoveryType). |
RemoteSystemAdded |
The event that is raised when a new remote system (device) is discovered. |
RemoteSystemRemoved |
The event that is raised when a previously discovered remote system (device) is no longer visible. |
RemoteSystemUpdated |
Raised when a remote system (device) that was previously discovered in this discovery session changes from proximally connected to cloud connected, or the reverse. It is also raised when a remote system changes one of its monitored properties (see the properties of the RemoteSystem class). |