示例#1
0
        private void OnPriceChange(bool isImage, RunnerChange runnerChange)
        {
            MarketRunner marketRunner = GetOrAdd(new RunnerId(runnerChange.Id, runnerChange.Hc));

            //update the runner
            marketRunner.OnPriceChange(isImage, runnerChange);
        }
示例#2
0
        private void OnRunnerDefinitionChange(RunnerDefinition runnerDefinition)
        {
            MarketRunner marketRunner = GetOrAdd(new RunnerId(runnerDefinition.Id, runnerDefinition.Hc));

            //update runner
            marketRunner.OnRunnerDefinitionChange(runnerDefinition);
        }
示例#3
0
        private MarketRunner GetOrAdd(RunnerId rid)
        {
            MarketRunner runner;

            if (!_marketRunners.TryGetValue(rid, out runner))
            {
                runner = new MarketRunner(this, rid);
                _marketRunners[rid] = runner;
            }
            return(runner);
        }