示例#1
0
        public static EdxCourse Load(string folderName)
        {
            var course = new FileInfo(string.Format("{0}/course.xml", folderName)).DeserializeXml <EdxCourse>();

            course.StaticFiles        = Directory.GetFiles(string.Format("{0}/static", folderName));
            course.CourseWithChapters = CourseWithChapters.Load(folderName, course.UrlName);
            return(course);
        }
示例#2
0
        public static EdxCourse Load(string folderName, EdxLoadOptions options = null)
        {
            options = options ?? new EdxLoadOptions();
            var course = new FileInfo($"{folderName}/course.xml").DeserializeXml <EdxCourse>();

            course.StaticFiles        = $"{folderName}/static".GetFiles();
            course.CourseWithChapters = CourseWithChapters.Load(folderName, course.UrlName, options);
            return(course);
        }