public MicrographCacheService(BoxOptionsApiSettings settings, IAssetQuoteSubscriber subscriber) { this.settings = settings; this.subscriber = subscriber; graphData = new Dictionary <string, List <Price> >(); }
public GameManager(BoxOptionsApiSettings settings, IGameDatabase database, ICoefficientCalculator calculator, IAssetQuoteSubscriber quoteFeed, IWampHostedRealm wampRealm, IMicrographCache micrographCache, IBoxConfigRepository boxConfigRepository, ILogRepository logRepository, ILog appLog, IHistoryHolder historyHolder) { this.database = database; this.calculator = calculator; this._assetQuoteSubscriber = quoteFeed; this.settings = settings; this.logRepository = logRepository; this.appLog = appLog; this.wampRealm = wampRealm; this.boxConfigRepository = boxConfigRepository; this.micrographCache = micrographCache; _historyHolder = historyHolder; _coefficientCache = new CoefficientCache(); if (this.settings != null && this.settings != null && this.settings.GameManager != null) { MaxUserBuffer = this.settings.GameManager.MaxUserBuffer; } GameManagerId = Guid.NewGuid().ToString(); userList = new List <UserState>(); betCache = new List <GameBet>(); assetCache = new Dictionary <string, PriceCache>(); this._assetQuoteSubscriber.MessageReceived += QuoteFeed_MessageReceived; //calculateBoxConfig = null; dbBoxConfig = Task.Run(() => LoadBoxParameters()).Result; Console.WriteLine("Db Box Config = [{0}]", string.Join(",", dbBoxConfig.Select(b => b.AssetPair))); coefStatus = new Dictionary <string, string>(); _historyHolder.InitializationFinished += HistoryHolder_InitializationFinished; }
public GameController(BoxOptionsApiSettings settings, IGameManager gameManager, IAssetQuoteSubscriber assetQuoteSubscriber, ILog log, IBoxConfigRepository assetConfigRepo) { _settings = settings; this.gameManager = gameManager; this.assetQuoteSubscriber = assetQuoteSubscriber; this.log = log; this.assetConfigRepo = assetConfigRepo; }
public CoefController(BoxOptionsApiSettings settings, IAssetDatabase history, ILogRepository logRepository, ILog log, IGameManager gameManager, ICoefficientCalculator coefficientCalculator) { _settings = settings; this.logRepository = logRepository; this.history = history; this.log = log; _gameManager = gameManager; _coefficientCalculator = coefficientCalculator; }
public HistoryHolder(BoxOptionsApiSettings settings, IAssetQuoteSubscriber subscriber, IAssetDatabase assetDatabase, ILog appLog) { _settings = settings; _assetDatabase = assetDatabase; _log = appLog; _subscriber = subscriber; _holder = new Dictionary <string, LinkedList <Price> >(); isStarting = true; }
public AssetQuoteSubscriber(BoxOptionsApiSettings settings, ILog log, IAssetDatabase history, IBoxConfigRepository boxRepo) { _isDisposing = false; _primaryStreamLastMessageTimeStamp = _secondaryStreamLastMessageTimeStamp = DateTime.UtcNow; _assetCache = new List <InstrumentPrice>(); this._settings = settings; this._logger = log; this._history = history; this._boxRepo = boxRepo; _lastPrices = new Dictionary <string, InstrumentPrice>(); _checkConnectionTimer = new System.Threading.Timer(CheckConnectionTimerCallback, null, -1, -1); _primaryGameInstruments = settings.PricesSettingsBoxOptions.PrimaryFeed.AllowedAssets.ToList(); if (settings.PricesSettingsBoxOptions.SecondaryFeed != null) { _secondaryGameInstruments = settings.PricesSettingsBoxOptions.SecondaryFeed.AllowedAssets.ToList(); } }
public PublicSettingsModule(BoxOptionsApiSettings settings) { _settings = settings; }
public VersionController(BoxOptionsApiSettings settings, ICoefficientCalculator coefficientCalculator) { _settings = settings; _coefficientCalculator = coefficientCalculator; }
public PriceFeedService(BoxOptionsApiSettings settings, IWampHostedRealm realm, IAssetQuoteSubscriber subscriber) { this.settings = settings; this.subscriber = subscriber; subject = realm.Services.GetSubject <IInstrumentPrice>(this.settings.PricesSettingsBoxOptions.PricesTopicName); }
/// <summary> /// Default constructor with ref to <see cref="BoxOptionsSettings"/> /// </summary> /// <param name="settings"></param> public ProxyCoefficientCalculator(BoxOptionsApiSettings settings) { this.settings = settings; }