private IObservable <QueuedStoreDto> UpdateQueueCache(QueuedStoreDto queuedStoreDto) => Observable .Create <QueuedStoreDto>(observer => _queue .Connect() .RefCount() .CacheChangeSet($"{nameof(GetQueue)}-{queuedStoreDto.Id}", _apiClient.BlobCache) .Subscribe(_ => observer.OnNext(queuedStoreDto)));
public QueuedItemViewModel(QueuedStoreDto dto) { Id = dto.Id; Name = dto.Store.Name; RemainingQueueTime = dto.RemainingQueueTime; this.WhenAnyValue(x => x.RemainingQueueTime) .RemainingTime(RxApp.TaskpoolScheduler) .ObserveOn(RxApp.MainThreadScheduler) .ToProperty(this, nameof(CurrentQueueTime), out _currentQueueTime, dto.RemainingQueueTime.TimeOfDay - DateTimeOffset.Now.TimeOfDay); }