public string GetString(XmlNameTable nameTable) { PrefixHandleType type = _type; if (type != PrefixHandleType.Buffer) { return(GetString(type)); } else { return(_bufferReader.GetString(_offset, _length, nameTable)); } }
public string GetString(XmlNameTable nameTable) { StringHandleType type = _type; if (type == StringHandleType.UTF8) { return(_bufferReader.GetString(_offset, _length, nameTable)); } if (type == StringHandleType.Dictionary) { return(nameTable.Add(_bufferReader.GetDictionaryString(_key).Value)); } DiagnosticUtility.DebugAssert(type == StringHandleType.ConstString, "Should be ConstString"); //If not Utf8 then the StringHandleType is ConstString return(nameTable.Add(s_constStrings[_key])); }
private string GetCharsText() { DiagnosticUtility.DebugAssert(_type == ValueHandleType.UTF8, ""); if (_length == 1 && _bufferReader.GetByte(_offset) == '1') { return("1"); } return(_bufferReader.GetString(_offset, _length)); }