GetString() public method

public GetString ( int offset, int length ) : string
offset int
length int
return string
Beispiel #1
0
        public string GetString(XmlNameTable nameTable)
        {
            PrefixHandleType type = _type;

            if (type != PrefixHandleType.Buffer)
            {
                return(GetString(type));
            }
            else
            {
                return(_bufferReader.GetString(_offset, _length, nameTable));
            }
        }
Beispiel #2
0
        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]));
        }
Beispiel #3
0
 private string GetCharsText()
 {
     DiagnosticUtility.DebugAssert(_type == ValueHandleType.UTF8, "");
     if (_length == 1 && _bufferReader.GetByte(_offset) == '1')
     {
         return("1");
     }
     return(_bufferReader.GetString(_offset, _length));
 }
 string GetCharsText()
 {
     Fx.Assert(type == ValueHandleType.UTF8, "");
     if (length == 1 && bufferReader.GetByte(offset) == '1')
     {
         return("1");
     }
     return(bufferReader.GetString(offset, length));
 }
        public string GetString(XmlNameTable nameTable)
        {
            StringHandleType type = this.type;

            if (type == StringHandleType.UTF8)
            {
                return(bufferReader.GetString(offset, length, nameTable));
            }
            if (type == StringHandleType.Dictionary)
            {
                return(nameTable.Add(bufferReader.GetDictionaryString(key).Value));
            }
            if (type == StringHandleType.ConstString)
            {
                return(nameTable.Add(constStrings[key]));
            }
            Fx.Assert(type == StringHandleType.EscapedUTF8, "");
            return(bufferReader.GetEscapedString(offset, length, nameTable));
        }
Beispiel #6
0
        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));
            }
            if (type == StringHandleType.ConstString)
            {
                return(nameTable.Add(s_constStrings[_key]));
            }
            // If none of the above, must be StringHandleType.EscapedUTF8
            DiagnosticUtility.DebugAssert(type == StringHandleType.EscapedUTF8, "Should be EscapedUTF8");
            return(_bufferReader.GetEscapedString(_offset, _length, nameTable));
        }