CommentReflowerTest.TestTextPoint.GetText C# (CSharp) 메소드

GetText() 공개 메소드

public GetText ( object obj ) : string
obj object
리턴 string
        public string GetText(object obj)
        {
            // FIXME: this function is not implemented to handle multiple lines!!!!

            if (obj is int)
            {
                int val = (int) obj;

                if ((val == -1) && (mCharPosition == 0))
                {
                    // ugly hack!
                    return "\r\n";
                }

                return mParent.GetLine(mLineNum).Substring(mCharPosition,val);

            }
            else if (obj is TestTextPoint)
            {
                TestTextPoint end = (TestTextPoint) obj;
                return mParent.GetLine(mLineNum).Substring(mCharPosition,end.mCharPosition - mCharPosition);
            }

            return "";
        }