System.Xml.BitStack.PushCurr C# (CSharp) Méthode

PushCurr() private méthode

this.curr has enough space for 31 bits (minus 1 for sentinel bit). Once this space is exhausted, a uint stack is created to handle the overflow.
private PushCurr ( ) : void
Résultat void
        private void PushCurr() {
            int len;

            if (this.bitStack == null) {
                this.bitStack = new uint[16];
            }

            // Push current unsigned int (which has been filled) onto a stack
            // and initialize this.curr to be used for future pushes.
            this.bitStack[this.stackPos++] = this.curr;
            this.curr = 0x1;

            // Resize stack if necessary
            len = this.bitStack.Length;
            if (this.stackPos >= len) {
                uint[] bitStackNew = new uint[2 * len];
                Array.Copy(this.bitStack, bitStackNew, len);
                this.bitStack = bitStackNew;
            }
        }