Exemplo n.º 1
0
        public SystemDefinition Get(ConfigSystemDefinition config)
        {
            SystemDefinition res = CreateObject(ClassesLoader.FindType(config.ClassLibrary, config.ClassName));

            SetDefaultParams(res, config.ParamsDefaults);
            return(res);
        }
Exemplo n.º 2
0
        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));
        }