コード例 #1
0
        public void Bind(IListView <T> subscriber)
        {
            if (!_subscribers.Contains(subscriber))
            {
                _subscribers.Add(subscriber);
            }

            //If we just bound, then fire off a refresh to this subscriber that all elements were just inserted.
            if (MainListStore.MainList.Count > 0)
            {
                subscriber.Receive(Store, Store.Select((o, i) => new Change()
                {
                    Index = i, ChangeSetType = Change.ChangeType.Insert
                }).ToList());
            }
        }