@@ -50,8 +50,12 @@ ILoggerFactory logger
5050	} 
5151
5252
53- 	public  async  Task  ResolveDirectoryTree ( Cancel  ctx )  => 
53+ 	public  async  Task  ResolveDirectoryTree ( Cancel  ctx ) 
54+ 	{ 
55+ 		_logger . LogInformation ( "Resolving tree" ) ; 
5456		await  DocumentationSet . Tree . Resolve ( ctx ) ; 
57+ 		_logger . LogInformation ( "Resolved tree" ) ; 
58+ 	} 
5559
5660	public  async  Task  GenerateAll ( Cancel  ctx ) 
5761	{ 
@@ -62,11 +66,30 @@ public async Task GenerateAll(Cancel ctx)
6266		if  ( CompilationNotNeeded ( generationState ,  out  var  offendingFiles ,  out  var  outputSeenChanges ) ) 
6367			return ; 
6468
65- 		_logger . LogInformation ( "Resolving tree" ) ; 
6669		await  ResolveDirectoryTree ( ctx ) ; 
67- 		_logger . LogInformation ( "Resolved tree" ) ; 
6870
71+ 		await  ProcessDocumentationFiles ( offendingFiles ,  outputSeenChanges ,  ctx ) ; 
72+ 
73+ 		await  ExtractEmbeddedStaticResources ( ctx ) ; 
74+ 
75+ 
76+ 		_logger . LogInformation ( $ "Completing diagnostics channel") ; 
77+ 		Context . Collector . Channel . TryComplete ( ) ; 
6978
79+ 		_logger . LogInformation ( $ "Generating documentation compilation state") ; 
80+ 		await  GenerateDocumentationState ( ctx ) ; 
81+ 		_logger . LogInformation ( $ "Generating links.json") ; 
82+ 		await  GenerateLinkReference ( ctx ) ; 
83+ 
84+ 		_logger . LogInformation ( $ "Completing diagnostics channel") ; 
85+ 
86+ 		await  Context . Collector . StopAsync ( ctx ) ; 
87+ 
88+ 		_logger . LogInformation ( $ "Completed diagnostics channel") ; 
89+ 	} 
90+ 
91+ 	private  async  Task  ProcessDocumentationFiles ( HashSet < string >  offendingFiles ,  DateTimeOffset  outputSeenChanges ,  Cancel  ctx ) 
92+ 	{ 
7093		var  processedFileCount  =  0 ; 
7194		var  exceptionCount  =  0 ; 
7295		_  =  Context . Collector . StartAsync ( ctx ) ; 
@@ -91,7 +114,10 @@ await Parallel.ForEachAsync(DocumentationSet.Files, ctx, async (file, token) =>
91114			if  ( processedFiles  %  100  ==  0 ) 
92115				_logger . LogInformation ( $ "-> Handled { processedFiles }  files") ; 
93116		} ) ; 
117+ 	} 
94118
119+ 	private  async  Task  ExtractEmbeddedStaticResources ( Cancel  ctx ) 
120+ 	{ 
95121		_logger . LogInformation ( $ "Copying static files to output directory") ; 
96122		var  embeddedStaticFiles  =  Assembly . GetExecutingAssembly ( ) 
97123			. GetManifestResourceNames ( ) 
@@ -111,21 +137,6 @@ await Parallel.ForEachAsync(DocumentationSet.Files, ctx, async (file, token) =>
111137			await  resourceStream . CopyToAsync ( stream ,  ctx ) ; 
112138			_logger . LogInformation ( $ "Copied static embedded resource { path } ") ; 
113139		} 
114- 
115- 
116- 		_logger . LogInformation ( $ "Completing diagnostics channel") ; 
117- 		Context . Collector . Channel . TryComplete ( ) ; 
118- 
119- 		_logger . LogInformation ( $ "Generating documentation compilation state") ; 
120- 		await  GenerateDocumentationState ( ctx ) ; 
121- 		_logger . LogInformation ( $ "Generating links.json") ; 
122- 		await  GenerateLinkReference ( ctx ) ; 
123- 
124- 		_logger . LogInformation ( $ "Completing diagnostics channel") ; 
125- 
126- 		await  Context . Collector . StopAsync ( ctx ) ; 
127- 
128- 		_logger . LogInformation ( $ "Completed diagnostics channel") ; 
129140	} 
130141
131142	private  async  Task  ProcessFile ( HashSet < string >  offendingFiles ,  DocumentationFile  file ,  DateTimeOffset  outputSeenChanges ,  CancellationToken  token ) 
0 commit comments