Beispiel #1
0
 public bool Equals2(int key1, int key2, XmlBufferReader bufferReader2)
 {
     // If the keys aren't from the same dictionary, they still might be the same
     if (key1 == key2)
     {
         return(true);
     }
     else
     {
         return(GetDictionaryString(key1).Value == bufferReader2.GetDictionaryString(key2).Value);
     }
 }
Beispiel #2
0
        private bool Equals2(int offset2, int length2, XmlBufferReader bufferReader2)
        {
            StringHandleType type = _type;

            if (type == StringHandleType.Dictionary)
            {
                return(bufferReader2.Equals2(offset2, length2, _bufferReader.GetDictionaryString(_key).Value));
            }
            if (type == StringHandleType.UTF8)
            {
                return(_bufferReader.Equals2(_offset, _length, bufferReader2, offset2, length2));
            }
            DiagnosticUtility.DebugAssert(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString, "");
            return(GetString() == _bufferReader.GetString(offset2, length2));
        }
Beispiel #3
0
 public bool Equals2(int offset1, int length1, XmlBufferReader bufferReader2, int offset2, int length2)
 {
     if (length1 != length2)
     {
         return(false);
     }
     byte[] buffer1 = _buffer;
     byte[] buffer2 = bufferReader2._buffer;
     for (int i = 0; i < length1; i++)
     {
         if (buffer1[offset1 + i] != buffer2[offset2 + i])
         {
             return(false);
         }
     }
     return(true);
 }
Beispiel #4
0
 public StringHandle(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
     SetValue(0, 0);
 }
Beispiel #5
0
 public PrefixHandle(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
 }
Beispiel #6
0
 public ValueHandle(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
     _type         = ValueHandleType.Empty;
 }