//---------------------------------------------------------------------------
// Wrapper for TextPatternRange.FindText Method
//---------------------------------------------------------------------------
internal void Range_FindText(TextPatternRange callingRange, ref TextPatternRange targetRange, string text, bool backward, bool ignoreCase, Type expectedException, CheckType checkType)
{
string call = "TextPatternRange.FindText(" + text + ", " + backward + ", " + ignoreCase + ")";
Comment("---Calling " + call);
if (callingRange == null)
throw new ArgumentNullException(call + " requires non-NULL TextPatterncallingRange");
try
{
targetRange = callingRange.FindText(text, backward, ignoreCase);
}
catch (Exception actualException)
{
if (Library.IsCriticalException(actualException))
throw;
TestException(expectedException, actualException, call, checkType);
return;
}
TestNoExceptionQuiet(expectedException, call, checkType);
}