public DeepData Get(string contractName) { var contract = model.Contracts.Where(a => a.Name == contractName).FirstOrDefault(); if (contract == null) { return(new DeepData()); } if (!container.Orders.ContainsKey(contract.Code)) { return(new DeepData()); } var c = container.Orders[contract.Code]; var r = new DeepData(); var s = c.SellQueue.ToList(); var b = c.BuyQueue.ToList(); foreach (var v in s) { r.AddOrder(v); } foreach (var v in b) { r.AddOrder(v); } return(r); }
public DeepData Get(string contractName) { var r = new DeepData(); var s = container.SellOrders.ToList(); var b = container.BuyOrders.ToList(); foreach (var v in s) { r.AddOrder(v); } foreach (var v in b) { r.AddOrder(v); } return(r); }