public void RegisterDependencyType() { if (DependencyGraph == null) { return; } BuildPhaseUtility.RunBuildSteps( Processor.BuildSteps, buildStep => { if (buildStep is ISupportIncrementalBuildStep) { Logger.LogVerbose($"Processor {Processor.Name}, step {buildStep.Name}: Registering DependencyType..."); using (new LoggerPhaseScope(buildStep.Name, LogLevel.Diagnostic)) { var types = (buildStep as ISupportIncrementalBuildStep).GetDependencyTypesToRegister(); if (types == null) { return; } DependencyGraph.RegisterDependencyType(types); } } }); }
private static void BuildArticle(HostService hostService, int maxParallelism) { using (var aggregatedPerformanceScope = new AggregatedPerformanceScope()) { hostService.Models.RunAll( m => { using (new LoggerFileScope(m.LocalPathFromRoot)) { Logger.LogDiagnostic($"Processor {hostService.Processor.Name}: Building..."); BuildPhaseUtility.RunBuildSteps( hostService.Processor.BuildSteps, buildStep => { Logger.LogDiagnostic($"Processor {hostService.Processor.Name}, step {buildStep.Name}: Building..."); using (new LoggerPhaseScope(buildStep.Name, LogLevel.Diagnostic, aggregatedPerformanceScope)) { buildStep.Build(m, hostService); } }); } }, maxParallelism); } }
private static void Postbuild(HostService hostService) { BuildPhaseUtility.RunBuildSteps( hostService.Processor.BuildSteps, buildStep => { Logger.LogVerbose($"Processor {hostService.Processor.Name}, step {buildStep.Name}: Postbuilding..."); using (new LoggerPhaseScope(buildStep.Name, LogLevel.Verbose)) { buildStep.Postbuild(hostService.Models, hostService); } }); }
private static void Prebuild(HostService hostService) { BuildPhaseUtility.RunBuildSteps( hostService.Processor.BuildSteps, buildStep => { Logger.LogVerbose($"Processor {hostService.Processor.Name}, step {buildStep.Name}: Prebuilding..."); using (new LoggerPhaseScope(buildStep.Name, LogLevel.Verbose)) { var models = buildStep.Prebuild(hostService.Models, hostService); if (!object.ReferenceEquals(models, hostService.Models)) { Logger.LogVerbose($"Processor {hostService.Processor.Name}, step {buildStep.Name}: Reloading models..."); hostService.Reload(models); } } }); }