예제 #1
0
파일: Loader.cs 프로젝트: nanoqsh/rtt_sharp
        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);
        }