Exemplo n.º 1
0
        public void Start()
        {
            var api = new Api();

            api.GetPost(1)
            .SubscribeOn(NewThreadScheduler.Default)
            .Timeout(TimeSpan.FromMilliseconds(10000))
            .Subscribe((url) => {
                _view.ExecuteOnMainThread(() => _view.ShowUrl(url));
            }, (error) => {
                _view.ExecuteOnMainThread(() => _view.ShowError());
            }).DisposeWith(_disposables);
        }