Пример #1
0
 private IObservable <UnitDto> SetPriceFeedThroughput(IConnection connection, FeedThroughputDto request)
 {
     return(Observable.FromAsync(() =>
     {
         connection.SetAuthToken(_authTokenProvider.AuthToken);
         return connection.ControlHubProxy.Invoke <UnitDto>(ServiceConstants.Server.SetPriceFeedThroughput, request);
     }));
 }
Пример #2
0
        public IObservable <UnitDto> SetPriceFeedThroughput(FeedThroughputDto request)
        {
            if (string.IsNullOrWhiteSpace(_authTokenProvider.AuthToken))
            {
                return(GetExceptionForNoAuthKey <UnitDto>());
            }

            return(RequestUponConnection(conn => SetPriceFeedThroughput(conn, request), ControlConnectionTimeout));
        }
Пример #3
0
        public IObservable <Unit> SetPriceFeedThroughput(double throughput)
        {
            var dto = new FeedThroughputDto
            {
                Throughput = throughput
            };

            return(_controlServiceClient.SetPriceFeedThroughput(dto)
                   .Select(_ => Unit.Default));
        }
Пример #4
0
 public UnitDto SetPriceFeedThroughput(FeedThroughputDto throughputDto)
 {
     Log.InfoFormat("Received set price feed throughput command to {0} from {1}.", throughputDto.Throughput, ContextUtil.GetUserName(Context));
     _priceFeed.SetUpdateFrequency(throughputDto.Throughput);
     return(new UnitDto());
 }