예제 #1
0
        public EndpointSettingUseCase(IEndPointListPresenter endPointListPresenter,
                                      IEndpointSettingRepository endpointSettingRepository)
        {
            this.endPointListPresenter = endPointListPresenter;

            endPointListPresenter.OnSaveButtonClickedAsObservable.Subscribe(_ =>
            {
                endpointSettingRepository.Save(endPointListPresenter.EndpointSettingList);
            }).AddTo(_disposable);

            this.endpointSettingRepository = endpointSettingRepository;
        }
예제 #2
0
 public void Save()
 {
     endpointSettingRepository.Save(viewModelList.Select(EndpointSettingTranslator.Translate));
 }