Wrap() static private method

static private Wrap ( UIAutomationClient range, TextPattern pattern ) : TextPatternRange
range UIAutomationClient
pattern TextPattern
return TextPatternRange
Ejemplo n.º 1
0
 public TextPatternRange FindAttribute(AutomationTextAttribute attribute, object value, bool backward)
 {
     Utility.ValidateArgumentNonNull(attribute, "attribute");
     Utility.ValidateArgumentNonNull(value, "value");
     if ((attribute == TextPattern.CultureAttribute) && (value is CultureInfo))
     {
         value = ((CultureInfo)value).LCID;
     }
     try
     {
         return(TextPatternRange.Wrap(
                    this._range.FindAttribute(attribute.Id, value, Utility.ConvertToInt(backward)), this._pattern));
     }
     catch (System.Runtime.InteropServices.COMException e)
     {
         Exception newEx; if (Utility.ConvertException(e, out newEx))
         {
             throw newEx;
         }
         else
         {
             throw;
         }
     }
 }
Ejemplo n.º 2
0
 public TextPatternRange Clone()
 {
     try
     {
         return(TextPatternRange.Wrap(_range.Clone(), this._pattern));
     }
     catch (System.Runtime.InteropServices.COMException e)
     {
         Exception newEx; if (Utility.ConvertException(e, out newEx))
         {
             throw newEx;
         }
         else
         {
             throw;
         }
     }
 }
Ejemplo n.º 3
0
 public TextPatternRange FindText(string text, bool backward, bool ignoreCase)
 {
     try
     {
         return(TextPatternRange.Wrap(
                    this._range.FindText(text, Utility.ConvertToInt(backward), Utility.ConvertToInt(ignoreCase)), this._pattern));
     }
     catch (System.Runtime.InteropServices.COMException e)
     {
         Exception newEx; if (Utility.ConvertException(e, out newEx))
         {
             throw newEx;
         }
         else
         {
             throw;
         }
     }
 }