public override void GetToken(int attNum, out QName name, out string value) { Debug.Assert(0 <= attNum && attNum < ReadEndPos - ReadStartPos - 1); XmlNodeType nodeType; XmlToken.Get(ref Buffer[(ReadStartPos + attNum) & Mask], out nodeType, out name, out value); Debug.Assert(nodeType == (attNum == 0 ? XmlNodeType.Element : XmlNodeType.Attribute), "We use GetToken() only to access parts of start element tag."); }
public override void Read(out XmlNodeType nodeType, out QName name, out string value) { lock (this) { Debug.Assert(ReadEndPos <= WritePos && WritePos <= ReadStartPos + Buffer.Length); if (ReadEndPos == WritePos) { if (ReadEndPos == ReadStartPos + Buffer.Length) { ExpandBuffer(); Monitor.Pulse(this); } Monitor.Wait(this); } if (_exception != null) { throw new XsltException("Exception happened during transformation. See inner exception for details:\n", _exception); } } Debug.Assert(ReadEndPos < WritePos); XmlToken.Get(ref Buffer[ReadEndPos & Mask], out nodeType, out name, out value); ReadEndPos++; }
public virtual void Read(out XmlNodeType nodeType, out QName name, out string value) { Debug.Assert(ReadEndPos < Buffer.Length); XmlToken.Get(ref Buffer[ReadEndPos], out nodeType, out name, out value); ReadEndPos++; }