internal void PopScope() { if (this.contextItemCount == 0) { throw new XmlException("Unexpected end of element scope."); } this.contextItemCount--; XmlParserContext.ContextItem contextItem = (XmlParserContext.ContextItem) this.contextItems[this.contextItemCount]; this.baseURI = contextItem.BaseURI; this.xmlLang = contextItem.XmlLang; this.xmlSpace = contextItem.XmlSpace; }
internal void PushScope() { XmlParserContext.ContextItem contextItem; if (this.contextItems.Count == this.contextItemCount) { contextItem = new XmlParserContext.ContextItem(); this.contextItems.Add(contextItem); } else { contextItem = (XmlParserContext.ContextItem) this.contextItems[this.contextItemCount]; } contextItem.BaseURI = this.BaseURI; contextItem.XmlLang = this.XmlLang; contextItem.XmlSpace = this.XmlSpace; this.contextItemCount++; }