Wrap() static private method

static private Wrap ( UIAutomationClient obj ) : AutomationElementCollection
obj UIAutomationClient
return AutomationElementCollection
示例#1
0
        public AutomationElementCollection FindAll(TreeScope scope, Condition condition)
        {
            Utility.ValidateArgumentNonNull(condition, "condition");

            try
            {
                UIAutomationClient.IUIAutomationElementArray elemArray =
                    this._obj.FindAllBuildCache(
                        (UIAutomationClient.TreeScope)scope,
                        condition.NativeCondition,
                        CacheRequest.CurrentNativeCacheRequest);
                return(AutomationElementCollection.Wrap(elemArray));
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                Exception newEx; if (Utility.ConvertException(e, out newEx))
                {
                    throw newEx;
                }
                else
                {
                    throw;
                }
            }
        }