RemoveFromSelection() public method

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

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

            try
            {
                callingRange.RemoveFromSelection();
            }
            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);
        }