private void SetStrategiesFromFiles(List <Strategy> strategies, List <string> puths) { foreach (string puth in puths) { Strategy strategy = StrategyRepParse.ParseCreateStrategy(puth); strategies.Add(strategy); } }
private static List <Instrument> ParseInstruments(string path) { Dictionary <InstrumentTypes, List <string> > instrumentPaths = GetInstrumentsPaths(path); List <Instrument> instruments = new List <Instrument>(); foreach (KeyValuePair <InstrumentTypes, List <string> > instrumentPath in instrumentPaths) { List <Strategy> strategies = new List <Strategy>(); foreach (string strategyPath in instrumentPath.Value) { Strategy strategy = StrategyRepParse.ParseCreateStrategy(strategyPath); strategies.Add(strategy); } Instrument instrument = new Instrument(instrumentPath.Key, strategies); instruments.Add(instrument); } return(instruments); }