コード例 #1
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 protected XmlBaseReader()
 {
     _bufferReader = new XmlBufferReader(this);
     _nsMgr = new NamespaceManager(_bufferReader);
     _quotas = XmlDictionaryReaderQuotas.Max;
     _rootElementNode = new XmlElementNode(_bufferReader);
     _atomicTextNode = new XmlAtomicTextNode(_bufferReader);
     _node = s_closedNode;
 }
コード例 #2
0
 protected XmlBaseReader()
 {
     this.bufferReader = new XmlBufferReader(this);
     this.nsMgr = new NamespaceManager(bufferReader);
     this.quotas = new XmlDictionaryReaderQuotas();
     this.rootElementNode = new XmlElementNode(bufferReader);
     this.atomicTextNode = new XmlAtomicTextNode(bufferReader);
     this.node = closedNode;
 }
コード例 #3
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);
     }
 }
コード例 #4
0
        private bool Equals2(int offset2, int length2, XmlBufferReader bufferReader2)
        {
            switch (this.type)
            {
            case StringHandleType.Dictionary:
                return(bufferReader2.Equals2(offset2, length2, this.bufferReader.GetDictionaryString(this.key).Value));

            case StringHandleType.UTF8:
                return(this.bufferReader.Equals2(this.offset, this.length, bufferReader2, offset2, length2));
            }
            return(this.GetString() == this.bufferReader.GetString(offset2, length2));
        }
コード例 #5
0
        private bool Equals2(int key2, XmlBufferReader bufferReader2)
        {
            switch (this.type)
            {
                case StringHandleType.Dictionary:
                    return this.bufferReader.Equals2(this.key, key2, bufferReader2);

                case StringHandleType.UTF8:
                    return this.bufferReader.Equals2(this.offset, this.length, bufferReader2.GetDictionaryString(key2).Value);
            }
            return (this.GetString() == this.bufferReader.GetDictionaryString(key2).Value);
        }
コード例 #6
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));
        }
コード例 #7
0
        bool Equals2(int offset2, int length2, XmlBufferReader bufferReader2)
        {
            StringHandleType type = this.type;

            if (type == StringHandleType.Dictionary)
            {
                return(bufferReader2.Equals2(offset2, length2, bufferReader.GetDictionaryString(this.key).Value));
            }
            if (type == StringHandleType.UTF8)
            {
                return(bufferReader.Equals2(this.offset, this.length, bufferReader2, offset2, length2));
            }
            Fx.Assert(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString, "");
            return(GetString() == bufferReader.GetString(offset2, length2));
        }
コード例 #8
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);
 }
コード例 #9
0
ファイル: ValueHandle.cs プロジェクト: geoffkizer/corefx
 public ValueHandle(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
     _type = ValueHandleType.Empty;
 }
コード例 #10
0
 public bool Equals2(int key1, int key2, XmlBufferReader bufferReader2)
 {
     return ((key1 == key2) || (this.GetDictionaryString(key1).Value == bufferReader2.GetDictionaryString(key2).Value));
 }
コード例 #11
0
 public PrefixHandle(XmlBufferReader bufferReader)
 {
     this.bufferReader = bufferReader;
 }
コード例 #12
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlCommentNode(XmlBufferReader bufferReader)
     : base(XmlNodeType.Comment,
            new PrefixHandle(bufferReader),
            new StringHandle(bufferReader),
            new ValueHandle(bufferReader),
            XmlNodeFlags.HasValue,
            ReadState.Interactive,
            null,
            0)
 {
 }
コード例 #13
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public NamespaceManager(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
     _shortPrefixUri = new Namespace[(int)PrefixHandleType.Max];
     _shortPrefixUri[(int)PrefixHandleType.Empty] = s_emptyNamespace;
     _namespaces = null;
     _nsCount = 0;
     _attributes = null;
     _attributeCount = 0;
     _space = XmlSpace.None;
     _lang = string.Empty;
     _depth = 0;
 }
コード例 #14
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlAtomicTextNode(XmlBufferReader bufferReader)
     : base(XmlNodeType.Text,
            new PrefixHandle(bufferReader),
            new StringHandle(bufferReader),
            new ValueHandle(bufferReader),
            XmlNodeFlags.HasValue | XmlNodeFlags.AtomicValue | XmlNodeFlags.SkipValue | XmlNodeFlags.HasContent,
            ReadState.Interactive,
            null,
            0)
 {
 }
コード例 #15
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlCDataNode(XmlBufferReader bufferReader)
     : base(XmlNodeType.CDATA,
            new PrefixHandle(bufferReader),
            new StringHandle(bufferReader),
            new ValueHandle(bufferReader),
            XmlNodeFlags.HasValue | XmlNodeFlags.HasContent,
            ReadState.Interactive,
            null,
            0)
 {
 }
コード例 #16
0
 public StringHandle(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
     SetValue(0, 0);
 }
コード例 #17
0
 bool Equals2(int offset2, int length2, XmlBufferReader bufferReader2)
 {
     StringHandleType type = this.type;
     if (type == StringHandleType.Dictionary)
         return bufferReader2.Equals2(offset2, length2, bufferReader.GetDictionaryString(this.key).Value);
     if (type == StringHandleType.UTF8)
         return bufferReader.Equals2(this.offset, this.length, bufferReader2, offset2, length2);
     Fx.Assert(type == StringHandleType.EscapedUTF8 || type == StringHandleType.ConstString, "");
     return GetString() == bufferReader.GetString(offset2, length2);
 }
コード例 #18
0
 public PrefixHandle(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
 }
コード例 #19
0
 public Namespace(XmlBufferReader bufferReader)
 {
     this.prefix = new PrefixHandle(bufferReader);
     this.uri = new StringHandle(bufferReader);
     this.outerUri = null;
     this.uriString = null;
 }
コード例 #20
0
 public bool Equals2(int offset1, int length1, XmlBufferReader bufferReader2, int offset2, int length2)
 {
     if (length1 != length2)
         return false;
     byte[] buffer1 = this.buffer;
     byte[] buffer2 = bufferReader2.buffer;
     for (int i = 0; i < length1; i++)
     {
         if (buffer1[offset1 + i] != buffer2[offset2 + i])
             return false;
     }
     return true;
 }
コード例 #21
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;
 }
コード例 #22
0
 public ValueHandle(XmlBufferReader bufferReader)
 {
     this.bufferReader = bufferReader;
     this.type         = ValueHandleType.Empty;
 }
コード例 #23
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlElementNode(XmlBufferReader bufferReader)
     : this(new PrefixHandle(bufferReader),
            new StringHandle(bufferReader),
            new ValueHandle(bufferReader))
 {
 }
コード例 #24
0
 public StringHandle(XmlBufferReader bufferReader)
 {
     this.bufferReader = bufferReader;
     SetValue(0, 0);
 }
コード例 #25
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlAttributeNode(XmlBufferReader bufferReader)
     : this(new PrefixHandle(bufferReader), new StringHandle(bufferReader), new ValueHandle(bufferReader))
 {
 }
コード例 #26
0
 public bool Equals2(int key1, int key2, XmlBufferReader bufferReader2)
 {
     return((key1 == key2) || (this.GetDictionaryString(key1).Value == bufferReader2.GetDictionaryString(key2).Value));
 }
コード例 #27
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlWhitespaceTextNode(XmlBufferReader bufferReader)
     : base(XmlNodeType.Whitespace,
            new PrefixHandle(bufferReader),
            new StringHandle(bufferReader),
            new ValueHandle(bufferReader),
            XmlNodeFlags.HasValue,
            ReadState.Interactive,
            null,
            0)
 {
 }
コード例 #28
0
 public NamespaceManager(XmlBufferReader bufferReader)
 {
     this.bufferReader = bufferReader;
     this.shortPrefixUri = new Namespace[(int)PrefixHandleType.Max];
     this.shortPrefixUri[(int)PrefixHandleType.Empty] = emptyNamespace;
     this.namespaces = null;
     this.nsCount = 0;
     this.attributes = null;
     this.attributeCount = 0;
     this.space = XmlSpace.None;
     this.lang = string.Empty;
     this.depth = 0;
 }
コード例 #29
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlDeclarationNode(XmlBufferReader bufferReader)
     : base(XmlNodeType.XmlDeclaration,
            new PrefixHandle(bufferReader),
            new StringHandle(bufferReader),
            new ValueHandle(bufferReader),
            XmlNodeFlags.CanGetAttribute,
            ReadState.Interactive,
            null,
            0)
 {
 }
コード例 #30
0
 public ValueHandle(XmlBufferReader bufferReader)
 {
     _bufferReader = bufferReader;
     _type         = ValueHandleType.Empty;
 }
コード例 #31
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public XmlClosedNode(XmlBufferReader bufferReader)
     : base(XmlNodeType.None,
            new PrefixHandle(bufferReader),
            new StringHandle(bufferReader),
            new ValueHandle(bufferReader),
            XmlNodeFlags.None,
            ReadState.Closed,
            null,
            0)
 {
 }
コード例 #32
0
 public StringHandle(XmlBufferReader bufferReader)
 {
     this.bufferReader = bufferReader;
     this.SetValue(0, 0);
 }
コード例 #33
0
ファイル: XmlBaseReader.cs プロジェクト: noahfalk/corefx
 public Namespace(XmlBufferReader bufferReader)
 {
     _prefix = new PrefixHandle(bufferReader);
     _uri = new StringHandle(bufferReader);
     _outerUri = null;
     _uriString = null;
 }
コード例 #34
0
        private bool Equals2(int offset2, int length2, XmlBufferReader bufferReader2)
        {
            switch (this.type)
            {
                case StringHandleType.Dictionary:
                    return bufferReader2.Equals2(offset2, length2, this.bufferReader.GetDictionaryString(this.key).Value);

                case StringHandleType.UTF8:
                    return this.bufferReader.Equals2(this.offset, this.length, bufferReader2, offset2, length2);
            }
            return (this.GetString() == this.bufferReader.GetString(offset2, length2));
        }
コード例 #35
0
 public ValueHandle(XmlBufferReader bufferReader)
 {
     this.bufferReader = bufferReader;
     this.type = ValueHandleType.Empty;
 }
コード例 #36
0
ファイル: StringHandle.cs プロジェクト: noahfalk/corefx
 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);
 }