private IObservable <IEnumerable <CurrencyPairStateDto> > GetCurrencyPairStates(IConnection connection) { return(Observable.FromAsync(() => { connection.SetAuthToken(_authTokenProvider.AuthToken); return connection.ControlHubProxy.Invoke <IEnumerable <CurrencyPairStateDto> >(ServiceConstants.Server.GetCurrencyPairStates); })); }
private IObservable <UnitDto> SetCurrencyPairState(IConnection connection, CurrencyPairStateDto request) { return(Observable.FromAsync(() => { connection.SetAuthToken(_authTokenProvider.AuthToken); return connection.ControlHubProxy.Invoke <UnitDto>(ServiceConstants.Server.SetCurrencyPairState, request); })); }
private IObservable <FeedThroughputDto> GetPriceFeedThroughput(IConnection connection) { return(Observable.FromAsync(() => { connection.SetAuthToken(_authTokenProvider.AuthToken); return connection.ControlHubProxy.Invoke <FeedThroughputDto>(ServiceConstants.Server.GetPriceFeedThroughput); })); }