Beispiel #1
0
        private async void Init()
        {
            await Task.Run(() =>
            {
                List <KeyValuePair <string, (DateTime, double)> > list = new List <KeyValuePair <string, (DateTime, double)> >();


                SelectAll().ToObservable().Subscribe(a =>
                {
                    lock (list)
                    {
                        list.AddRange(a);
                    }

                    model.OnNext(list.AsEnumerable());
                });
            });
        }
Beispiel #2
0
 private async void Init()
 {
     await System.Threading.Tasks.Task.Run(() => GetAll().SelectMany(a => a).AsParallel().ToArray())
     .ContinueWith(async a => model.OnNext(await a), TaskScheduler.FromCurrentSynchronizationContext());
 }