System.Xml.Xsl.Runtime.XmlAttributeCache.EnsureAttributeCache C# (CSharp) Méthode

EnsureAttributeCache() private méthode

Ensure that attribute array has been created and is large enough for at least one additional entry.
private EnsureAttributeCache ( ) : void
Résultat void
        private void EnsureAttributeCache() {
            if (this.arrAttrs == null) {
                // Create caching array
                this.arrAttrs = new AttrNameVal[DefaultCacheSize];
            }
            else if (this.numEntries >= this.arrAttrs.Length) {
                // Resize caching array
                Debug.Assert(this.numEntries == this.arrAttrs.Length);
                AttrNameVal[] arrNew = new AttrNameVal[this.numEntries * 2];
                Array.Copy(this.arrAttrs, arrNew, this.numEntries);
                this.arrAttrs = arrNew;
            }
        }
    }