コード例 #1
0
        public StreamingDataViewModel(DataFeed dataFeed)
        {
            AllValues = new ReactiveList<int>();
            AllValuesViewModels = AllValues.CreateDerivedCollection(x => x);

            StartRecievingData = new ReactiveCommand();

            var s = StartRecievingData.RegisterAsync(x => dataFeed.GetInfiniteSequence(1000))
                .Subscribe(d =>
                {
                    TheValue = d; //this works how I expect
                    //AllValues.Add(d); //this crashes. Why?
                });
        }