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

ParseNumericCharRef() private method

private ParseNumericCharRef ( bool expand, StringBuilder internalSubsetBuilder, EntityType &entityType ) : int
expand bool
internalSubsetBuilder StringBuilder
entityType EntityType
return int
        private int ParseNumericCharRef(bool expand, StringBuilder internalSubsetBuilder, out EntityType entityType)
        {
            for (;;)
            {
                int newPos;
                int charCount;
                switch (newPos = ParseNumericCharRefInline(_ps.charPos, expand, internalSubsetBuilder, out charCount, out entityType))
                {
                    case -2:
                        // read new characters in the buffer
                        if (ReadData() == 0)
                        {
                            Throw(SR.Xml_UnexpectedEOF);
                        }
                        Debug.Assert(_ps.chars[_ps.charPos] == '&');
                        continue;
                    default:
                        if (expand)
                        {
                            _ps.charPos = newPos - charCount;
                        }
                        return newPos;
                }
            }
        }
XmlTextReaderImpl