RemoteAutomationClientSession 类

定义

表示远程应用程序的 UI 自动化客户端会话。

public ref class RemoteAutomationClientSession sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.UIAutomation.Core.IRemoteAutomationClientSessionFactory, 131072, "Windows.UI.UIAutomation.UIAutomationContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.UI.UIAutomation.UIAutomationContract, 131072)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class RemoteAutomationClientSession final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.UIAutomation.Core.IRemoteAutomationClientSessionFactory), 131072, "Windows.UI.UIAutomation.UIAutomationContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.UI.UIAutomation.UIAutomationContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class RemoteAutomationClientSession
Public NotInheritable Class RemoteAutomationClientSession
继承
Object Platform::Object IInspectable RemoteAutomationClientSession
属性

Windows 要求

设备系列
Windows 11 (在 10.0.22000.0 中引入)
API contract
Windows.UI.UIAutomation.UIAutomationContract (在 v2.0 中引入)

注解

此类由主机应用程序 ((例如在本地计算机上运行的远程桌面应用)使用,) 插入并实现与远程会话 (容器或网络) 的命名管道共享。 主机应用程序将实现 ConnectionRequested/Disconnected 回调以共享命名管道,然后启动/停止客户端会话以启用/禁用这些回调。

构造函数

RemoteAutomationClientSession(String)

使用提供的名称初始化 RemoteAutomationClientSession 类的新实例。

RemoteAutomationClientSession(String, Guid)

使用提供的参数初始化 RemoteAutomationClientSession 类的新实例。

属性

SessionId

获取 RemoteAutomationClientSession 的唯一标识符。

方法

CreateWindowAsync(UInt64, UInt32, Object)

在父 AutomationElement 和子远程窗口之间创建父-子关系。

Start()

开始 RemoteAutomationClientSession,使 UI 自动化客户端能够创建与远程会话的连接。

Stop()

终止当前 RemoteAutomationClientSession

事件

ConnectionRequested

请求连接到远程系统时发生。

Disconnected

RemoteAutomationClientSession 断开连接时发生。

适用于

另请参阅