System.Xml.XmlTextReaderImpl.ParseNamedCharRef C# (CSharp) Method

ParseNamedCharRef() private method

private ParseNamedCharRef ( bool expand, StringBuilder internalSubsetBuilder ) : int
expand bool
internalSubsetBuilder StringBuilder
return int
        private int ParseNamedCharRef(bool expand, StringBuilder internalSubsetBuilder)
        {
            for (;;)
            {
                int newPos;
                switch (newPos = ParseNamedCharRefInline(_ps.charPos, expand, internalSubsetBuilder))
                {
                    case -1:
                        return -1;
                    case -2:
                        // read new characters in the buffer
                        if (ReadData() == 0)
                        {
                            return -1;
                        }
                        Debug.Assert(_ps.chars[_ps.charPos] == '&');
                        continue;
                    default:
                        if (expand)
                        {
                            _ps.charPos = newPos - 1;
                        }
                        return newPos;
                }
            }
        }
XmlTextReaderImpl