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;
}
}
}