RemoteSystemSessionInvitationReceivedEventArgs Класс

Определение

Содержит сведения о событии RemoteSystemSessionInvitationListener.InvitationReceived , а именно о связанном объекте RemoteSystemSessionInvitation .

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
Наследование
Object Platform::Object IInspectable RemoteSystemSessionInvitationReceivedEventArgs
Атрибуты

Требования к Windows

Семейство устройств
Windows 10 Creators Update (появилось в 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (появилось в v4.0)
Возможности приложения
remoteSystem

Примеры

Пример получения и обработки приглашений удаленного сеанса см. в следующем коде.

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

Комментарии

Этот класс создается каждый раз, когда возникает событие RemoteSystemSessionInvitationListener.InvitationReceived и должно обрабатываться методами, зарегистрированными в этом событии.

Свойства

Invitation

Возвращает объект RemoteSystemSessionInvitation , связанный с полученным приглашением.

Применяется к