RemoteSystemSessionInvitationListener 클래스

정의

원격 세션에 참가하기 위한 초대를 받고 처리하는 기능을 포함합니다. 이 클래스는 인스턴스화될 때 초대 수신 대기를 시작합니다.

public ref class RemoteSystemSessionInvitationListener sealed
/// [Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
/// [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 RemoteSystemSessionInvitationListener final
[Windows.Foundation.Metadata.Activatable(262144, "Windows.Foundation.UniversalApiContract")]
[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 RemoteSystemSessionInvitationListener
function RemoteSystemSessionInvitationListener()
Public NotInheritable Class RemoteSystemSessionInvitationListener
상속
Object Platform::Object IInspectable RemoteSystemSessionInvitationListener
특성

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

설명

중요

이 클래스의 이벤트에 대한 처리기를 설정하기 전에 RemoteSystem.RequestAccessAsync 를 호출하여 원격 시스템 플랫폼에 대한 액세스를 확인해야 합니다.

생성자

RemoteSystemSessionInvitationListener()

RemoteSystemSessionInvitationListener의 instance 초기화합니다.

이벤트

InvitationReceived

다른 디바이스의 원격 세션 초대가 감지되면 발생합니다.

적용 대상