System.Xml.HWStack.Push C# (CSharp) Méthode

Push() private méthode

private Push ( ) : Object
Résultat Object
        internal Object Push() {
            if (this.used == this.size) {
                if (this.limit <= this.used) {
                    throw new XmlException(Res.Xml_StackOverflow, string.Empty);
                }
                Object[] newstack = new Object[this.size + this.growthRate];
                if (this.used > 0) {
                    System.Array.Copy(this.stack, 0, newstack, 0, this.used);
                }
                this.stack = newstack;
                this.size += this.growthRate;
            }
            return this.stack[this.used++];
        }

Usage Example

        /// <include file='doc\XmlNamespaceManager.uex' path='docs/doc[@for="XmlNamespaceManager.PushScope"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public virtual void PushScope()
        {
            Scope current = (Scope)scopes.Push();

            if (current == null)
            {
                current = new Scope();
                scopes.AddToTop(current);
            }
            current.Default = defaultNs;
            current.Count   = count;
            count           = 0;
        }
All Usage Examples Of System.Xml.HWStack::Push