示例#1
0
        public Slide Load(FileInfo file, string unitName, int slideIndex, CourseSettings settings)
        {
            var sourceCode = file.ContentAsUtf8();
            var prelude    = GetPrelude(file.Directory);
            var fs         = new FileSystem(file.Directory);

            return(SlideParser.ParseCode(sourceCode, new SlideInfo(unitName, file, slideIndex), prelude, fs));
        }
示例#2
0
        private static Slide GenerateSlideFromFile(string path)
        {
            var file = new FileInfo(path);

            return(SlideParser.ParseSlide(
                       file,
                       new SlideInfo(new Unit(new UnitSettings(), file.Directory), file, 0),
                       file.Directory, CourseSettings.DefaultSettings));
        }
示例#3
0
        private static Slide GenerateSlide(string name)
        {
            var dir = new DirectoryInfo(@".\tests\stub");

            return(SlideParser.ParseSlide(
                       new FileInfo(@".\tests\" + name),
                       new SlideInfo(new Unit(new UnitSettings(), dir), dir.GetFile(name), 0),
                       dir, CourseSettings.DefaultSettings));
        }
 private static Slide GenerateSlideFromFile(string path)
 {
     return(SlideParser.ParseSlide(path, null, new StubFS()));
 }
 private static Slide GenerateSlide(string name)
 {
     return(SlideParser.ParseSlide(@".\tests\" + name, null, new StubFS()));
 }
示例#6
0
        public Slide Load(FileInfo file, Unit unit, int slideIndex, string courseId, CourseSettings settings)
        {
            var prelude = GetPrelude(file.Directory);

            return(SlideParser.ParseSlide(file, new SlideInfo(unit, file, slideIndex), prelude, file.Directory, settings));
        }