public static async Task OpenMarket(MarketQueryResponse snapshot) { Market.Market market = new Market.Market(snapshot); await market.TradeHistory.Resolve5mCandles(); bool added; do { added = Markets.TryAdd(market.MarketDelta, market); } while (!added); }
public static async Task <bool> TryOpenMarket(MarketQueryResponse snapshot) { Market.Market market = new Market.Market(snapshot); bool resolved = await market.TradeHistory.Resolve5mCandles(false); if (!resolved) { return(false); } else { bool added; do { added = Markets.TryAdd(market.MarketDelta, market); } while (!added); } return(true); }