internal List<IUiElement> GetAutomationElementsWithFindAll(
IUiElement element,
ControlSearcherData data,
classic.Condition conditions,
bool caseSensitiveParam,
bool onlyOneResult,
bool onlyTopLevel,
bool viaWildcardOrRegex)
{
var resultCollection = new List<IUiElement>();
try {
IUiEltCollection results =
element.FindAll(
classic.TreeScope.Descendants,
conditions);
resultCollection =
WindowSearcher.ReturnOnlyRightElements(
results,
data,
caseSensitiveParam,
viaWildcardOrRegex);
if (null != results) {
// results.Dispose(); // taboo!
results = null;
}
// results = null;
}
catch { //(Exception eWildCardSearch) {
}
return resultCollection;
}