コード例 #1
0
ファイル: XmlBufferReader.cs プロジェクト: Potapy4/dotnet-wcf
 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);
     }
 }
コード例 #2
0
        private bool Equals2(int key2, XmlBufferReader bufferReader2)
        {
            StringHandleType type = _type;

            if (type == StringHandleType.Dictionary)
            {
                return(_bufferReader.Equals2(_key, key2, bufferReader2));
            }
            if (type == StringHandleType.UTF8)
            {
                return(_bufferReader.Equals2(_offset, _length, bufferReader2.GetDictionaryString(key2).Value));
            }
            DiagnosticUtility.DebugAssert(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString, "");
            return(GetString() == _bufferReader.GetDictionaryString(key2).Value);
        }
コード例 #3
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]));
        }
コード例 #4
0
 private XmlDictionaryString GetDictionaryString()
 {
     DiagnosticUtility.DebugAssert(_type == ValueHandleType.Dictionary, "");
     return(_bufferReader.GetDictionaryString(_offset));
 }