Example #1
0
        public TItem RemoveItemAt(int section, int row)
        {
            var index = new SectionedIndex(section, row);

            var changes = new List <CollectionChange>();

            if (collection[section].Count == 1)
            {
                changes.Add(
                    new CollectionChange {
                    Index = index, Type = CollectionChangeType.RemoveSection
                }
                    );
            }
            else
            {
                changes.Add(
                    new CollectionChange {
                    Index = index, Type = CollectionChangeType.RemoveRow
                }
                    );
            }

            var item = collection.RemoveItemAt(section, row);

            collectionChangesSubject.OnNext(changes);

            return(item);
        }
        public TItem RemoveItemAt(int section, int row)
        {
            var index = new SectionedIndex(section, row);
            var item  = collection.RemoveItemAt(section, row);

            collectionChangesSubject.OnNext(new RemoveRowCollectionChange(index));

            return(item);
        }
Example #3
0
        public TItem RemoveItemAt(int section, int row)
        {
            var index = new SectionedIndex(section, row);
            var item  = collection.RemoveItemAt(section, row);

            var changes = new CollectionChangesListBuilder <TItem>();

            changes.RemoveRow(index);
            collectionChangesSubject.OnNext(changes.Build());

            return(item);
        }