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

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

            this.endpointSettingRepository = endpointSettingRepository;
        }
Ejemplo n.º 2
0
        public SendToEndpointUseCase(IEndPointListPresenter endpointListPresenter, IPulseDisplayPresenter pulseDisplayPresenter, ISenderRepository senderRepository)
        {
            this.endpointListPresenter = endpointListPresenter;
            this.pulseDisplayPresenter = pulseDisplayPresenter;
            this.senderRepository      = senderRepository;

            endpointListPresenter.OnSaveButtonClickedAsObservable.Subscribe(_ =>
            {
                Send("/connection-test-string", "Connection test : Hello string!");
                Send("/connection-test-string", "10");
                Send("/connection-test-string", "3.14");
            }).AddTo(_disposable);
        }