@@ -25,6 +25,7 @@ class ReadmeTarget(
2525 private const string ContributingTemplateFile = "ContributingTemplate.md" ;
2626 private const string ReadmeFile = "README.md" ;
2727 private const string ContributingFile = "CONTRIBUTING.md" ;
28+ private static readonly string Salt = $ "{ DateTime . Now . DayOfYear } d";
2829 private static readonly List < string > Reports =
2930 [
3031 "Transient" , "Singleton" , "Func" , "Enum" , "Array"
@@ -261,6 +262,8 @@ private static async Task AddClassDiagram(string logsDirectory, string exampleNa
261262 return ;
262263 }
263264
265+ classDiagram = classDiagram . Replace ( Salt , "" ) ;
266+
264267 await writer . WriteLineAsync ( "Class diagram:" ) ;
265268 await writer . WriteLineAsync ( ) ;
266269 await writer . WriteLineAsync ( "```mermaid" ) ;
@@ -270,7 +273,6 @@ private static async Task AddClassDiagram(string logsDirectory, string exampleNa
270273
271274 private static async Task AddExample ( string logsDirectory , string exampleSearchPattern , TextWriter writer )
272275 {
273- var salt = $ "{ DateTime . Now . DayOfYear } d";
274276 foreach ( var generatedCodeFile in Directory . GetFiles ( Path . Combine ( logsDirectory , "Pure.DI" , "Pure.DI.SourceGenerator" ) , exampleSearchPattern ) . OrderBy ( i => i ) )
275277 {
276278 var ns = string . Join ( '.' , Path . GetFileName ( generatedCodeFile ) . Split ( '.' ) . AsEnumerable ( ) . Reverse ( ) . Skip ( 3 ) . Reverse ( ) ) + "." ;
@@ -313,7 +315,7 @@ private static async Task AddExample(string logsDirectory, string exampleSearchP
313315 . Replace ( "System." , "" )
314316 . Replace ( "Pure.DI." , "" )
315317 . Replace ( "Benchmarks.Model." , "" )
316- . Replace ( salt , "" )
318+ . Replace ( Salt , "" )
317319 . Replace ( "(MethodImplOptions)256" , "MethodImplOptions.AggressiveInlining" )
318320 . Replace ( "(MethodImplOptions)8" , "MethodImplOptions.NoInlining" )
319321 . Replace ( "[NonSerializedAttribute] " , "" ) ) ) ;
0 commit comments