public static void ClassInitialize(TestContext context) { // Create test folder and test images UnitTestImageUtils.CreateTestImages("./testFolder", 3); // Create repository filesystemRepository = new FilesystemRepository(UnitTestImageUtils.imagesFolder); }
static void Main(string[] args) { Stopwatch watch = Stopwatch.StartNew(); var program = new Program(); var configuration = new Configuration(ReadPath, WritePath); var filesystemRepository = new FilesystemRepository(); program.MutateTocInMdFiles(configuration, filesystemRepository); program.GenerateSite(configuration, filesystemRepository); Console.WriteLine($"Done in {watch.ElapsedMilliseconds} millis."); }
public void GenerateSite(Configuration configuration, FilesystemRepository filesystemRepository) { var contentGenerator = new ContentGenerator(); var extractor = new TagsExtractor(filesystemRepository); var htmlTransformer = new MarkdownToHtml(); var expandTagsToMarkdown = new ExpandTagsToMarkdown(filesystemRepository); var readMdAndWriteHtml = new ReadMdAndWriteHtml(filesystemRepository, contentGenerator, htmlTransformer, expandTagsToMarkdown); var siteGenerator = new SiteGenerator( contentGenerator, filesystemRepository, extractor, readMdAndWriteHtml, htmlTransformer); siteGenerator.Execute(configuration, baseUrl, editBaseUrl); }