public EndpointSettingUseCase(IEndPointListPresenter endPointListPresenter, IEndpointSettingRepository endpointSettingRepository) { this.endPointListPresenter = endPointListPresenter; endPointListPresenter.OnSaveButtonClickedAsObservable.Subscribe(_ => { endpointSettingRepository.Save(endPointListPresenter.EndpointSettingList); }).AddTo(_disposable); this.endpointSettingRepository = endpointSettingRepository; }
public void Save() { endpointSettingRepository.Save(viewModelList.Select(EndpointSettingTranslator.Translate)); }