Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 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);
     }
 }