internal static object Wrap(AutomationElement el, object pattern, bool cached) { return (pattern == null) ? null : new WindowPattern(el, (UIAutomationClient.IUIAutomationWindowPattern)pattern, cached); }