RemoteSystemSessionInvitationReceivedEventArgs Classe

Définition

Contient des informations sur un événement RemoteSystemSessionInvitationListener.InvitationReceived , à savoir l’objet RemoteSystemSessionInvitation associé.

public ref class RemoteSystemSessionInvitationReceivedEventArgs 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 RemoteSystemSessionInvitationReceivedEventArgs final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RemoteSystemSessionInvitationReceivedEventArgs 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 RemoteSystemSessionInvitationReceivedEventArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RemoteSystemSessionInvitationReceivedEventArgs
Public NotInheritable Class RemoteSystemSessionInvitationReceivedEventArgs
Héritage
Object Platform::Object IInspectable RemoteSystemSessionInvitationReceivedEventArgs
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 le code suivant pour obtenir un exemple de réception et de gestion des invitations de session à distance.

public void SubscribeAndHandleInvites() {
    var invitationListener = new RemoteSystemSessionInvitationListener();

    // register the following code to handle this event:
    invitationListener.InvitationReceived += async (sender, args) => {

        // issue a join request to the session
        RemoteSystemSessionJoinResult joinResult = await args.Invitation.RemoteSystemSessionInfo.JoinAsync();

        // handle the join result as in the normal session discovery scenario
        // ...
    };
}

Remarques

Cette classe est instanciée chaque fois que l’événement RemoteSystemSessionInvitationListener.InvitationReceived est déclenché et doit être géré par la ou les méthodes inscrites à cet événement.

Propriétés

Invitation

Obtient l’objet RemoteSystemSessionInvitation associé à l’invitation reçue.

S’applique à