public TextPatternRange RangeFromAnnotation(AutomationElement annotation)
{
Utility.ValidateArgumentNonNull(annotation, "annotation");
try
{
return TextPatternRange.Wrap(this._pattern.RangeFromAnnotation(annotation.NativeElement), this);
}
catch (System.Runtime.InteropServices.COMException e)
{
Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; }
}
}