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