public PriceFeedSimulator( ICurrencyPairRepository currencyPairRepository, IPricePublisher pricePublisher, IPriceLastValueCache priceLastValueCache) { _currencyPairRepository = currencyPairRepository; _pricePublisher = pricePublisher; _priceLastValueCache = priceLastValueCache; _random = new Random(_currencyPairRepository.GetHashCode()); }
public MainViewModel( IPricePublisher pricePublisher, IPriceFeed priceFeed, ICurrencyPairRepository currencyPairRepository, Func<CurrencyPairInfo, ICurrencyPairViewModel> ccyViewModelFactory) { _pricePublisher = pricePublisher; _priceFeed = priceFeed; _currencyPairRepository = currencyPairRepository; _ccyViewModelFactory = ccyViewModelFactory; StartStopCommand = new DelegateCommand(StartStopServer); CurrencyPairs = new ObservableCollection<ICurrencyPairViewModel>(); ObserveThroughputs(); }
public MainViewModel( IPricePublisher pricePublisher, IPriceFeed priceFeed, ICurrencyPairRepository currencyPairRepository, Func <CurrencyPairInfo, ICurrencyPairViewModel> ccyViewModelFactory) { _pricePublisher = pricePublisher; _priceFeed = priceFeed; _currencyPairRepository = currencyPairRepository; _ccyViewModelFactory = ccyViewModelFactory; StartStopCommand = new DelegateCommand(StartStopServer); CurrencyPairs = new ObservableCollection <ICurrencyPairViewModel>(); ObserveThroughputs(); }
public PriceServerConsole(string ip, int port) { //m_pubsub = new RedisIQFeed(ip, port); m_pubsub = new ZmqIQFeed(); m_pubsub.StartPricePublisher(ip, port); //m_pubsub.SubscribePriceUpdates(); //m_pubsub.OnSubscriberReceive += M_subscriber_Receive; //m_publisher = new ZMQPublisher(); //m_subscriber = new ZMQSubscriber(); //m_subscriberClientTask = Task.Factory.StartNew(() => m_subscriber.SubscriptionLoop()); //Task.Run(() => DisplaySubs()); // Load symbols and spread formulas (and subscribe to these symbols) ReloadSymbols(); ReloadSpreads(); }
public MarketDataViewModel(IPricePublisher pricePublisher, IPriceSource priceSource, IReferenceData referenceData) { _dispatcher = Dispatcher.CurrentDispatcher; _pricePublisher = pricePublisher; _priceSource = priceSource; _referenceData = referenceData; Filter = FilterRow; RefreshPricesCmd = new DelegateCommand((object param) => RefreshPrices()); LivePricesCmd = new DelegateCommand((object param) => ConfigureLivePriceUpdates()); foreach (var security in _referenceData.GetSecurities()) { _securityPrices.Add(new SecurityDataViewModel(security)); } RefreshPrices(); }
public PriceFeed(IPricePublisher pricePublisher) { this._pricePublisher = pricePublisher; }