public SystemDefinition Get(ConfigSystemDefinition config) { SystemDefinition res = CreateObject(ClassesLoader.FindType(config.ClassLibrary, config.ClassName)); SetDefaultParams(res, config.ParamsDefaults); return(res); }
public StockStat Get(string statName, string chartArea) { if (!_stats.TryGetValue(statName, out ConfigStatDefinition config)) { throw new Exception($"Stat not found: {statName}"); } return((StockStat)Activator.CreateInstance(ClassesLoader.FindType(config.ClassLibrary, config.ClassName), chartArea)); }