コード例 #1
0
        public PersistActor()
        {
            var tickerRepository = new TickerRepository(new ConfigurationFileApp().ConnectionString);

            Receive <IEnumerable <Ticker> >(tickers => {
                tickerRepository.Persist(tickers);
            });
        }
コード例 #2
0
        public void Initialize(string username, string server)
        {
            var concurrencyService = new ConcurrencyService();

            context = NetMQContext.Create();

            var tickerClient         = new TickerClient(context, server);
            var netMQHeartBeatClient = NetMQHeartBeatClient.CreateInstance(context, server);

            HeartBeatClient = new HeartBeatClient();

            var tickerFactory = new TickerFactory();

            TickerRepository = new TickerRepository(tickerClient, tickerFactory);
        }
コード例 #3
0
        public void Initialize(string username, string server, string authToken = null)
        {
            _connectionProvider = new ConnectionProvider(username, server);

            var tickerHubClient = new TickerHubClient(_connectionProvider);

            //if (authToken != null)
            //{
            //    var controlServiceClient = new ControlServiceClient(new AuthTokenProvider(authToken), _connectionProvider, _loggerFactory);
            //    _controlRepository = new ControlRepository(controlServiceClient);
            //}

            var concurrencyService = new ConcurrencyService();

            var tickerFactory = new TickerFactory();

            TickerRepository = new TickerRepository(tickerHubClient, tickerFactory);
        }