Exemplo n.º 1
0
        public EndpointSettingUseCase(IEndPointListPresenter endPointListPresenter,
                                      IEndpointSettingRepository endpointSettingRepository)
        {
            this.endPointListPresenter = endPointListPresenter;

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

            this.endpointSettingRepository = endpointSettingRepository;
        }
Exemplo n.º 2
0
 public void Save()
 {
     endpointSettingRepository.Save(viewModelList.Select(EndpointSettingTranslator.Translate));
 }