RemoteSystemSessionJoinResult Classe

Définition

Représente le résultat de la tentative de cet appareil de rejoindre une session à distance.

public ref class RemoteSystemSessionJoinResult sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RemoteSystemSessionJoinResult final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RemoteSystemSessionJoinResult final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RemoteSystemSessionJoinResult
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RemoteSystemSessionJoinResult
Public NotInheritable Class RemoteSystemSessionJoinResult
Héritage
Object Platform::Object IInspectable RemoteSystemSessionJoinResult
Attributs

Configuration requise pour Windows

Famille d’appareils
Windows 10 Creators Update (introduit dans 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v4.0)
Fonctionnalités de l’application
remoteSystem

Exemples

Consultez l’exemple de code ci-dessous pour connaître le processus de participation à une session à distance.

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.Session;

        // 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
    }
}

Propriétés

Session

Obtient l’objet RemoteSystemSession représentant la session qui a été jointe (si la tentative de jointure a réussi).

Status

Représente la réussite status de la tentative de cet appareil de rejoindre une session à distance.

S’applique à