public ForkRepositoryExecuteViewModel( IModelServiceFactory modelServiceFactory, IRepositoryForkService repositoryForkService ) { this.modelServiceFactory = modelServiceFactory; this.repositoryForkService = repositoryForkService; this.WhenAnyValue(model => model.UpdateOrigin) .Subscribe(value => CanAddUpstream = value); this.WhenAnyValue(model => model.UpdateOrigin, model => model.AddUpstream) .Subscribe(tuple => CanResetMasterTracking = tuple.Item1 && tuple.Item2); CreateFork = ReactiveCommand.CreateFromObservable(OnCreateFork); BackCommand = ReactiveCommand.Create(() => { }); }
public ForkRepositorySwitchViewModel(IRepositoryForkService repositoryForkService) { this.repositoryForkService = repositoryForkService; SwitchFork = ReactiveCommand.CreateAsyncObservable(OnSwitchFork); }