OpenTween.TweenMain.MyList_CacheVirtualItems C# (CSharp) Method

MyList_CacheVirtualItems() private method

private MyList_CacheVirtualItems ( object sender, CacheVirtualItemsEventArgs e ) : void
sender object
e CacheVirtualItemsEventArgs
return void
        private void MyList_CacheVirtualItems(object sender, CacheVirtualItemsEventArgs e)
        {
            if (sender != this._curList)
                return;

            var listCache = this._listItemCache;
            if (listCache?.TargetList == sender && listCache.IsSupersetOf(e.StartIndex, e.EndIndex))
            {
                // If the newly requested cache is a subset of the old cache,
                // no need to rebuild everything, so do nothing.
                return;
            }

            // Now we need to rebuild the cache.
            this.CreateCache(e.StartIndex, e.EndIndex);
        }
TweenMain