コード例 #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);
     }
 }
コード例 #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;
 }
コード例 #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);
        }
コード例 #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);
     }
 }