public void Add(StockCatalogDescriptor catalog) { ResolveCatalogReference(catalog); foreach (var stock in catalog.Stocks) { Add(stock); } }
private void ResolveCatalogReference(StockCatalogDescriptor catalog) { if (string.IsNullOrEmpty(catalog.Name)) { return; } using (var tom = Engine.ServiceProvider.CreateEntityRepository()) { var stockCatalog = tom.StockCatalogs.FirstOrDefault(sc => sc.Name.Equals(catalog.Name, StringComparison.OrdinalIgnoreCase)); if (stockCatalog == null) { throw new Exception("No such catalog in MauiDB: " + catalog.Name); } foreach (var tradedStock in stockCatalog.TradedStocks) { var stock = new StockHandle(tradedStock); Add(stock); } } }
public DefaultStockProcessingConfig() { Catalog = new StockCatalogDescriptor(); }
public void BeginInit() { Catalog = new StockCatalogDescriptor(); }