AddToSelection() public method

public AddToSelection ( ) : void
return void
Ejemplo n.º 1
-1
        //---------------------------------------------------------------------------
        // Wrapper for TextPatternRange.AddToSelection Method
        //---------------------------------------------------------------------------
        internal void Range_AddToSelection(TextPatternRange callingRange, Type expectedException, CheckType checkType)
        {
            string call = "TextPatternRange.AddToSelection()";
            Comment("---Calling " + call);

            if (callingRange == null)
                throw new ArgumentNullException(call + " requires non-NULL TextPatterncallingRange");

            try
            {
                callingRange.AddToSelection();
            }
            catch (Exception actualException)
            {
                if (Library.IsCriticalException(actualException))
                    throw;

                // Bug 1746355: Throw "NotSupported" from TextPattern methods that...um...aren't supported
                if ((actualException is NotSupportedException) && (_frameworkId == "wpf"))
                {
                    NotSupportedException nse = new NotSupportedException();

                    TestException(nse.GetType(), actualException, call, checkType);
                }
                else
                    TestException(expectedException, actualException, call, checkType);
                return;
            }
            TestNoExceptionQuiet(expectedException, call, checkType);
        }