RemoteSystemSessionJoinResult
RemoteSystemSessionJoinResult
RemoteSystemSessionJoinResult
RemoteSystemSessionJoinResult
Class
Definition
Represents the result of this device's attempt to join a remote session.
public : sealed class RemoteSystemSessionJoinResult : IRemoteSystemSessionJoinResultpublic sealed class RemoteSystemSessionJoinResult : IRemoteSystemSessionJoinResultPublic NotInheritable Class RemoteSystemSessionJoinResult Implements IRemoteSystemSessionJoinResult// You can use this class in JavaScript.
- Attributes
Windows 10 requirements
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Examples
See the code example below for the process of joining a remote session.
public async void JoinExistingSession() {
// request to join. sessionInfo has already been selected by user.
RemoteSystemSessionJoinResult joinResult = await sessionInfo.JoinAsync();
// process the result
if (joinResult.Status == RemoteSystemSessionJoinStatus.Success) {
// if the join was successful, acquire a reference to the session
currentSession = joinResult.RemoteSystemSession;
// optionally handle the disconnected event
currentSession.Disconnected += async (sender, args) => {
// update the UI, using args.Reason
};
// update the UI with the session.DisplayName and
// session.ControllerDisplayName strings. Save a reference to
// this RemoteSystemSession, to use when the user selects
// this session from the UI
} else {
// join request failed. optionally update UI
}
}
Properties
Session Session Session Session
Gets the RemoteSystemSession object representing the session that was joined (if the join attempt was successful).
public : RemoteSystemSession Session { get; }public RemoteSystemSession Session { get; }Public ReadOnly Property Session As RemoteSystemSession// You can use this property in JavaScript.
The RemoteSystemSession object representing the session that was joined (if the join attempt was successful). If the attempt failed, this value is null.
Status Status Status Status
Represents the success status of this device's attempt to join a remote session.
public : RemoteSystemSessionJoinStatus Status { get; }public RemoteSystemSessionJoinStatus Status { get; }Public ReadOnly Property Status As RemoteSystemSessionJoinStatus// You can use this property in JavaScript.
- Value
- RemoteSystemSessionJoinStatus RemoteSystemSessionJoinStatus RemoteSystemSessionJoinStatus RemoteSystemSessionJoinStatus
A RemoteSystemSessionJoinStatus value representing the result.