public MouthCellButtonViewModel CreateAndSetUpMouthCellButtonViewModel() { if (mouthCellButtonViewModel != null) { return(mouthCellButtonViewModel); } mouthCellButtonViewModel = new MouthCellButtonViewModel(); mouthCellButtonViewModel.ButtonClickStream.Subscribe(selectionIntent.OnNext); return(mouthCellButtonViewModel); }
public void SetViewModel(MouthCellButtonViewModel viewModel) { disposeBag.ClearDisposables(); this.viewModel = viewModel; disposeBag.AddDisposable(cellButton.OnClickAsObservable().Subscribe(viewModel.ButtonClickObserver)); }