//---------------------------------------------------------------------------
// Wrapper for TextPattern.GetVisibleRanges Method
//---------------------------------------------------------------------------
internal void Pattern_GetVisibleRanges(TextPattern textPattern, ref TextPatternRange[] returnedRanges, Type expectedException, CheckType checkType)
{
string call = "TextPattern.GetVisibleRanges()";
Comment("---Calling " + call);
try
{
returnedRanges = textPattern.GetVisibleRanges();
}
catch (Exception actualException)
{
if (Library.IsCriticalException(actualException))
throw;
TestException(expectedException, actualException, call, checkType);
return;
}
if (returnedRanges == null)
ThrowMe(checkType, call + " should not give a null TextPatternRange");
TestNoExceptionQuiet(expectedException, call, checkType);
}