예제 #1
0
        public SystemDefinition Get(ConfigSystemDefinition config)
        {
            SystemDefinition res = CreateObject(ClassesLoader.FindType(config.ClassLibrary, config.ClassName));

            SetDefaultParams(res, config.ParamsDefaults);
            return(res);
        }
예제 #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));
        }