getting auto-generated ProjectPath properties (new, part of aspire build auto-generated files), then injecting the correct project path into the newly added CodeChange's Parent property.
traverse through all the syntax nodes, check if a class is in the 'Projects' namespace (that's what is currently used for such files).
add to a private dictionary (project path, project property name)
use this to modify the CodeModifierConfig file
added to redis-apphost.json
bumping CodeAnalysis to 4.10.0-3.final for Microsoft.DotNet.Scaffolding.helpers
added to ClassDeclarationSyntaxExtensions
IsInNamespace - checks if the class is in a certain namespace
GetStringPropertyValue - gets value from a string property
ProjectPath
properties (new, part of aspire build auto-generated files), then injecting the correct project path into the newly addedCodeChange
'sParent
property.CodeModifierConfig
fileredis-apphost.json
4.10.0-3.final
forMicrosoft.DotNet.Scaffolding.helpers
ClassDeclarationSyntaxExtensions
IsInNamespace
- checks if the class is in a certain namespaceGetStringPropertyValue
- gets value from a string property