Example #1
0
 public DeviceService(IConnectableObservable <IDeviceView> source)
 {
     _disposable.Add(source
                     .GroupBy(x => x.DeviceId)
                     .Subscribe(deviceStream => {
         _disposable.Add(deviceStream
                         .Scan(DeviceUpdateEvent.GetInitialView(deviceStream.Key), DeviceUtils.Update)
                         .Subscribe(GetCreateSubject(deviceStream.Key)));
     }));
     _disposable.Add(source.Connect());
 }