RemoteSystemSessionInvitationReceivedEventArgs Kelas

Definisi

Berisi informasi tentang peristiwa RemoteSystemSessionInvitationListener.InvitationReceived , yaitu objek RemoteSystemSessionInvitation terkait.

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
Warisan
Object Platform::Object IInspectable RemoteSystemSessionInvitationReceivedEventArgs
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows 10 Creators Update (diperkenalkan dalam 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v4.0)
Kemampuan aplikasi
remoteSystem

Contoh

Lihat kode berikut untuk contoh cara menerima dan menangani undangan sesi jarak jauh.

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

Keterangan

Kelas ini dibuat setiap kali peristiwa RemoteSystemSessionInvitationListener.InvitationReceived dinaikkan, dan harus ditangani oleh metode yang terdaftar ke peristiwa ini.

Properti

Invitation

Mendapatkan objek RemoteSystemSessionInvitation yang terkait dengan undangan yang diterima.

Berlaku untuk