RemoteSystemSessionInvitation 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示会话参与者加入其远程会话的邀请。
public ref class RemoteSystemSessionInvitation 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 RemoteSystemSessionInvitation final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RemoteSystemSessionInvitation 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 RemoteSystemSessionInvitation
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RemoteSystemSessionInvitation
Public NotInheritable Class RemoteSystemSessionInvitation
- 继承
- 属性
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 事件一起传入的 RemoteSystemSessionInvitationReceivedEventArgs 对象中。
接收邀请的设备需要使用 RemoteSystemSessionInvitationListener 来处理邀请。
属性
Sender |
获取一个 RemoteSystem 对象,该对象表示发送邀请的设备。 |
SessionInfo |
获取一个 RemoteSystemSessionInfo 对象,该对象表示此设备被邀请到的会话。 |