public ChromeViewModel(IStartWindowViewModel main, IOverlayService overlayService) { Main = main; overlayService.Show .Subscribe(UpdateOverlay) .DisposeWith(this); CloseOverlayCommand = ReactiveCommand <object> .Create() .DisposeWith(this); CloseOverlayCommand.Subscribe(x => ClearOverlay()) .DisposeWith(this); }
public ChromeViewModel(IMainViewModel main, IOverlayService overlayService) { Main = main; overlayService.Show .Subscribe(x => UpdateOverlay(x)) .DisposeWith(this); CloseOverlayCommand = ReactiveCommand <object> .Create() .DisposeWith(this); CloseOverlayCommand.Subscribe(x => ClearOverlay()) .DisposeWith(this); Disposable.Create(() => CloseOverlayCommand = null) .DisposeWith(this); }