当前位置: 首页>>代码示例>>C#>>正文


C# CacheRequest.GetUiaCacheRequest方法代码示例

本文整理汇总了C#中System.Windows.Automation.CacheRequest.GetUiaCacheRequest方法的典型用法代码示例。如果您正苦于以下问题:C# CacheRequest.GetUiaCacheRequest方法的具体用法?C# CacheRequest.GetUiaCacheRequest怎么用?C# CacheRequest.GetUiaCacheRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Automation.CacheRequest的用法示例。


在下文中一共展示了CacheRequest.GetUiaCacheRequest方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Normalize

        internal AutomationElement Normalize(Condition condition, CacheRequest request )
        {
            CheckElement();

            UiaCoreApi.UiaCacheRequest cacheRequest;
            if (request == null)
                cacheRequest = CacheRequest.DefaultUiaCacheRequest;
            else
                cacheRequest = request.GetUiaCacheRequest();

            // Normalize against the treeview condition, not the one in the cache request...
            UiaCoreApi.UiaCacheResponse response = UiaCoreApi.UiaGetUpdatedCache(_hnode, cacheRequest, UiaCoreApi.NormalizeState.Custom, condition);
            return CacheHelper.BuildAutomationElementsFromResponse(cacheRequest, response);
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:14,代码来源:AutomationElement.cs

示例2: GetUpdatedCache

        /// <summary>
        /// Get an AutomationElement with updated cached values
        /// </summary>
        /// <param name="request">CacheRequest object describing the properties and other information to fetch</param>
        /// <returns>Returns a new AutomationElement, which refers to the same UI as this element, but which is
        /// populated with properties specified in the CacheRequest.</returns>
        /// <remarks>
        /// Unlike other methods, such as FromHandle, FromPoint, this method takes
        /// an explicit CacheRequest as a parameter, and ignores the currently
        /// active CacheRequest.
        /// </remarks>
        public AutomationElement GetUpdatedCache(CacheRequest request)
        {
            Misc.ValidateArgumentNonNull(request, "request");
            CheckElement();

            UiaCoreApi.UiaCacheRequest cacheRequest = request.GetUiaCacheRequest();

            // Don't normalize when getting updated cache...
            UiaCoreApi.UiaCacheResponse response = UiaCoreApi.UiaGetUpdatedCache(_hnode, cacheRequest, UiaCoreApi.NormalizeState.None, null);
            return CacheHelper.BuildAutomationElementsFromResponse(cacheRequest, response);
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:22,代码来源:AutomationElement.cs

示例3: Navigate

        // Called by the treewalker classes to navigate - we call through to the
        // provider wrapper, which gets the navigator code to do its stuff
        internal AutomationElement Navigate(NavigateDirection direction, Condition condition, CacheRequest request)
        {
            CheckElement();

            UiaCoreApi.UiaCacheRequest cacheRequest;
            if (request == null)
                cacheRequest = CacheRequest.DefaultUiaCacheRequest;
            else
                cacheRequest = request.GetUiaCacheRequest();

            UiaCoreApi.UiaCacheResponse response = UiaCoreApi.UiaNavigate(_hnode, direction, condition, cacheRequest);
            return CacheHelper.BuildAutomationElementsFromResponse(cacheRequest, response);
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:15,代码来源:AutomationElement.cs


注:本文中的System.Windows.Automation.CacheRequest.GetUiaCacheRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。