Beispiel #1
0
        public static Model LoadModel(string file)
        {
            Model model = JsonConvert.DeserializeObject <Model>(
                LoadText(Ref.Models + file),
                settings
                );

            List <string> errors = ModelRequirements.Check(model);

            if (errors.Count != 0)
            {
                throw new LoaderException(file, errors);
            }

            return(model);
        }