Esempio n. 1
0
        private string ReadNameToken(ref bool isName)
        {
            int startIndex = _index;

            while (_index < _length && IsNameChar(_text[_index]))
            {
                _index++;
            }

            isName = false;

            int count = _index - startIndex;

            if (count == 0)
            {
                return(string.Empty);
            }

            string token = _text.Substring(startIndex, count);

            // Check for namespace
            if (token == _log.MainTypeNamespace)
            {
                if (_index + 1 < _length && _text[_index] == '.' && IsNameChar(_text[_index + 1]))
                {
                    isName = true;
                    _index++;
                    return(string.Empty);
                }
            }

            string newName;

            if (_log.TryGetOldName(token, out newName))
            {
                return(newName);
            }

            return(token);
        }