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;
}
}
}