Inheritance: TextPattern
        internal static new object Wrap(AutomationElement el, object pattern, bool cached)
        {
            TextPattern2 result = null;

            if (pattern != null)
            {
                IUIAutomationTextPattern basePattern =
                    (IUIAutomationTextPattern)el.GetRawPattern(TextPattern.Pattern, cached);
                if (basePattern != null)
                {
                    result = new TextPattern2(el, (IUIAutomationTextPattern2)pattern,
                                              basePattern, cached);
                }
            }
            return(result);
        }
Beispiel #2
0
 internal static new object Wrap(AutomationElement el, object pattern, bool cached)
 {
     TextPattern2 result = null;
     if (pattern != null)
     {
         UIAutomationClient.IUIAutomationTextPattern basePattern =
             (UIAutomationClient.IUIAutomationTextPattern)el.GetRawPattern(TextPattern.Pattern, cached);
         if (basePattern != null)
         {
             result = new TextPattern2(el, (UIAutomationClient.IUIAutomationTextPattern2)pattern,
                 basePattern, cached);
         }
     }
     return result;
 }