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 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
Inheritance
Object Platform::Object IInspectable RemoteSystemSessionInvitationListener
Attributes

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)
App 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()

Initializes an instance of RemoteSystemSessionInvitationListener.

Events

InvitationReceived

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

Applies to