private void ExecuteAsync(long notional) { _executablePrice.ExecuteRequest(notional, _parent.DealtCurrency) .ObserveOn(_concurrencyService.Dispatcher) .SubscribeOn(_concurrencyService.TaskPool) .Subscribe(OnExecutedResult, OnExecutionError); }
void ExecuteTrade(IPrice price, IExecutablePrice executablePrice, WKInterfaceLabel label) { if (price == null) { throw new ArgumentNullException("price"); } if (price == null || price.IsStale || _executing) { return; } _executing = true; label.SetText("Executing..."); executablePrice.ExecuteRequest(100930, _pair.BaseCurrency) .Subscribe(result => { _executing = false; ShowConfirmation(result.Update); label.SetText(""); }) .Add(_disposables); }