System.Windows.Automation.Text.TextPatternRange.MoveEndpointByRange C# (CSharp) 메소드

MoveEndpointByRange() 공개 메소드

public MoveEndpointByRange ( TextPatternRangeEndpoint endpoint, TextPatternRange targetRange, TextPatternRangeEndpoint targetEndpoint ) : void
endpoint TextPatternRangeEndpoint
targetRange TextPatternRange
targetEndpoint TextPatternRangeEndpoint
리턴 void
        public void MoveEndpointByRange(TextPatternRangeEndpoint endpoint, TextPatternRange targetRange, TextPatternRangeEndpoint targetEndpoint)
        {
            try
            {
                this._range.MoveEndpointByRange(
                    (UIAutomationClient.TextPatternRangeEndpoint)endpoint,
                    targetRange.NativeRange,
                    (UIAutomationClient.TextPatternRangeEndpoint)targetEndpoint);
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; }
            }
        }

Usage Example

예제 #1
0
        //---------------------------------------------------------------------------
        // Wrapper for TextPatternRange.MoveEndpointByRange Method
        //---------------------------------------------------------------------------
        internal void Range_MoveEndpointByRange(TextPatternRange callingRange, TextPatternRangeEndpoint endPoint, TextPatternRange argumentRange, TextPatternRangeEndpoint targetEndPoint, Type expectedException, CheckType checkType)
        {
            string call = "TextPatternRange.MoveEndpointByRange(" + endPoint + ", " + argumentRange + ", " + targetEndPoint + ")";
            Comment("---Calling " + call);

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

            try
            {
                callingRange.MoveEndpointByRange(endPoint, argumentRange, targetEndPoint);
            }
            catch (Exception actualException)
            {
                if (Library.IsCriticalException(actualException))
                    throw;

                TestException(expectedException, actualException, call, checkType);
                return;
            }
            TestNoExceptionQuiet(expectedException, call, checkType);
        }