private void OnPriceChange(bool isImage, RunnerChange runnerChange) { MarketRunner marketRunner = GetOrAdd(new RunnerId(runnerChange.Id, runnerChange.Hc)); //update the runner marketRunner.OnPriceChange(isImage, runnerChange); }
private void OnRunnerDefinitionChange(RunnerDefinition runnerDefinition) { MarketRunner marketRunner = GetOrAdd(new RunnerId(runnerDefinition.Id, runnerDefinition.Hc)); //update runner marketRunner.OnRunnerDefinitionChange(runnerDefinition); }
private MarketRunner GetOrAdd(RunnerId rid) { MarketRunner runner; if (!_marketRunners.TryGetValue(rid, out runner)) { runner = new MarketRunner(this, rid); _marketRunners[rid] = runner; } return(runner); }