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)); }
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)); }
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())); }
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)); }