public AutomationElement GetUpdatedCache(CacheRequest request) { try { return(new AutomationElement(autoElement: IUIAutomationElement.BuildUpdatedCache(cacheRequest: request.IUIAutomationCacheRequest))); } catch (COMException ex) { Exception exception = null; if (UiaConvert.ConvertException(e: ex, newException: out exception)) { throw exception; } throw; } }