private void BuildCore(PhaseProcessor phaseProcessor, List <HostService> hostServices, DocumentBuildContext context) { try { phaseProcessor.Process(hostServices, context.MaxParallelism); } catch (BuildCacheException e) { var message = $"Build cache was corrupted, please try force rebuild `build --force` or clear the cache files in the path: {IntermediateFolder}. Detail error: {e.Message}."; Logger.LogError(message); throw new DocfxException(message, e); } }
public static ImmutableList<FileModel> Build(IDocumentProcessor processor, DocumentBuildParameters parameters, IMarkdownService markdownService) { var hostServiceCreator = new HostServiceCreator(null); var hostService = hostServiceCreator.CreateHostService( parameters, null, markdownService, null, processor, parameters.Files.EnumerateFiles()); var phaseProcessor = new PhaseProcessor { Handlers = { new PrebuildBuildPhaseHandler(null), new PostbuildPhaseHandler(null, null), } }; phaseProcessor.Process(new List<HostService> { hostService }, parameters.MaxParallelism); return hostService.Models; }
public static ImmutableList <FileModel> Build(IDocumentProcessor processor, DocumentBuildParameters parameters, IMarkdownService markdownService) { var hostServiceCreator = new HostServiceCreator(null); var hostService = hostServiceCreator.CreateHostService( parameters, null, markdownService, null, processor, parameters.Files.EnumerateFiles()); var phaseProcessor = new PhaseProcessor { Handlers = { new CompilePhaseHandler(null), new LinkPhaseHandler(null, null), } }; phaseProcessor.Process(new List <HostService> { hostService }, parameters.MaxParallelism); return(hostService.Models); }
private void BuildCore(PhaseProcessor phaseProcessor, List<HostService> hostServices, DocumentBuildContext context) { try { phaseProcessor.Process(hostServices, context.MaxParallelism); } catch (BuildCacheException e) { var message = $"Build cache was corrupted, please try force rebuild `build --force` or clear the cache files in the path: {IntermediateFolder}. Detail error: {e.Message}."; Logger.LogError(message); throw new DocfxException(message, e); } }