Example #1
0
        internal ArrayList GetSnapshot(out bool hasSubstBlocks)
        {
            if (this._charBufferLength != this._charBufferFree)
            {
                this.FlushCharBuffer(true);
            }
            this._lastBuffer = null;
            hasSubstBlocks   = false;
            ArrayList list  = new ArrayList();
            int       count = this._buffers.Count;

            for (int i = 0; i < count; i++)
            {
                object obj2 = this._buffers[i];
                HttpBaseMemoryResponseBufferElement element = obj2 as HttpBaseMemoryResponseBufferElement;
                if (element != null)
                {
                    if (element.FreeBytes > 0x1000)
                    {
                        obj2 = element.Clone();
                    }
                    else
                    {
                        element.DisableRecycling();
                    }
                }
                else if (obj2 is HttpSubstBlockResponseElement)
                {
                    hasSubstBlocks = true;
                }
                list.Add(obj2);
            }
            return(list);
        }