Esempio n. 1
0
        public void Initialize()
        {
            var model = Enumerable
                        .Range(0, 10000)
                        .Select(i => new ItemModel(uid: i.ToString(), displayName: "Item " + i))
                        .ToImmutableList();

            _subject = new BehaviorSubject <ImmutableList <ItemModel> >(model);

            _subject.ApplyOnCollection(this, Items,
                                       factory: () => new ItemVm(),
                                       syncer: (m, vm) => vm.ReadModel(m),
                                       trackBy: m => m.Uid,
                                       onRemove: vm => vm.Dispose());
        }