//---------------------------------------------------------------------------
// Wrapper for TextPattern.GetSelection Method
//---------------------------------------------------------------------------
internal void Pattern_GetSelection(TextPattern textPattern, ref TextPatternRange[] returnedRanges, Type expectedException, CheckType checkType)
{
string call = "TextPattern.GetSelection()";
Comment("---Calling " + call);
try
{
returnedRanges = textPattern.GetSelection();
}
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 array");
Comment(call + " returned an array of TextPatternRange size " + returnedRanges.Length);
TestNoExceptionQuiet(expectedException, call, checkType);
}