コード例 #1
0
        internal new static object Wrap(AutomationElement el, object pattern, bool cached)
        {
            TransformPattern2 result = null;

            if (pattern != null)
            {
                IUIAutomationTransformPattern basePattern =
                    (IUIAutomationTransformPattern)el.GetRawPattern(TransformPattern.Pattern, cached);
                if (basePattern != null)
                {
                    result = new TransformPattern2(el, (IUIAutomationTransformPattern2)pattern,
                                                   basePattern, cached);
                }
            }
            return(result);
        }
コード例 #2
0
 internal new static object Wrap(AutomationElement el, object pattern, bool cached)
 {
     TransformPattern2 result = null;
     if (pattern != null)
     {
         UIAutomationClient.IUIAutomationTransformPattern basePattern =
             (UIAutomationClient.IUIAutomationTransformPattern)el.GetRawPattern(TransformPattern.Pattern, cached);
         if (basePattern != null)
         {
             result = new TransformPattern2(el, (UIAutomationClient.IUIAutomationTransformPattern2)pattern,
                 basePattern, cached);
         }
     }
     return result;
 }