RemoteSystemSessionInvitationListener RemoteSystemSessionInvitationListener RemoteSystemSessionInvitationListener RemoteSystemSessionInvitationListener RemoteSystemSessionInvitationListener Class

Definition

Contains the functionality for receiving and handling invitations to join remote sessions. This class begins listening for invitations when it is instantiated.

public : sealed class RemoteSystemSessionInvitationListener
struct winrt::Windows::System::RemoteSystems::RemoteSystemSessionInvitationListener
public sealed class RemoteSystemSessionInvitationListener
Public NotInheritable Class RemoteSystemSessionInvitationListener
var remoteSystemSessionInvitationListener = new remoteSystemSessionInvitationListener();
Attributes

Windows 10 requirements

Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
remoteSystem

Examples

See the following code for an example of how to receive and handle remote session invitations.

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

Remarks

Important

You must confirm access to the remote system platform with a call to **RemoteSystem.RequestAccessAsync** before you set up handler(s) for this class' event(s).

Constructors

RemoteSystemSessionInvitationListener() RemoteSystemSessionInvitationListener() RemoteSystemSessionInvitationListener() RemoteSystemSessionInvitationListener() RemoteSystemSessionInvitationListener()

Initializes an instance of RemoteSystemSessionInvitationListener.

Events

InvitationReceived InvitationReceived InvitationReceived InvitationReceived InvitationReceived

Raised when a remote session invitation from another device has been detected.