c# - White UI Automation库如何使用CaSTLe DynamicProxy?

标签 c# .net user-interface castle-dynamicproxy

White UI 自动化库广泛使用 Castle Project' s DynamicProxy 2. 据我了解,DynamicProxy 用于“包装”MS UI Automation 对象,并用于检索其父窗口内的对象。

我需要了解 DynamicProxy 是否是必需的,是否可以用更快的东西替换它,即静态构建的类而不是在运行时生成的代理类,IMO 是不必要的减速。

DynamicProxy在White库中到底是做什么的,是否可以被替代?任何提示或指示表示赞赏。

最佳答案

我决定不使用 White(而是直接使用 MS UI Automation),但我还在我的代码中使用了 CaSTLe Dynamic Proxy。这是定位它的使用位置的一个不错的开始:

C:\Users\xxxx\Desktop\petmongrels-white-54723f8>findstr /s  /c:"ProxyCreator" /c:"CreateClassProxy" /c:"IInterceptor" *.cs
Components\Core\Source\CustomCommands\CustomCommandInterceptor.cs:    public class   CustomCommandInterceptor : IInterceptor
Components\Core\Source\Interceptors\CoreInterceptor.cs:    public class CoreInterceptor : IInterceptor
Components\Core\Source\UIItems\UIItemContainer.cs:            var interceptors = (IInterceptor[]) interceptorField.GetValue(customUIItem);
Components\Repository\Source\Interceptors\ScreenObjectInterceptor.cs:    public class  ScreenObjectInterceptor : IInterceptor
Components\Repository\Source\Interceptors\UIItemInterceptor.cs:    public class UIItemInterceptor : IInterceptor
Components\Repository\Source\Interceptors\WindowInterceptor.cs:    public class WindowInterceptor : IInterceptor
Components\Repository\Source\Services\ServiceInterceptor.cs:    public class ServiceInterceptor : IInterceptor

您可以在以下位置获取源代码:https://github.com/petmongrels/white

(我的有点过时了)

关于c# - White UI Automation库如何使用CaSTLe DynamicProxy?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11828965/

相关文章:

java - 如何打开特定的 Jframe 作为主 jframe?

c# - uwp xaml 解析失败,类库 dll

c# - 你应该在哪里存储 3rd 方程序集?

multithreading - 父GUI对话框线程的子线程可以创建子窗口吗?

javascript - 网络自动化工具

c# - 使用ftp上传文件

c# - 从比屏幕高的控件绘制位图

c# - NuGet 不更新我的项目中的 dll 引用

c# - OrmLite for ServiceStack 3 不支持可空枚举属性?

.net - 使用客户端对象模型获取用户在共享点中没有权限的子网站的名称