Encapsulation of grouped account selection events and collective events.

This commit is contained in:
Burak Kaan Köse
2024-12-29 19:37:36 +01:00
parent eef2ee1baa
commit f7bfbd5080
16 changed files with 242 additions and 49 deletions

View File

@@ -41,16 +41,17 @@ namespace Wino.Core.SourceGeneration.Translator
predicate: static (node, _) => node is ClassDeclarationSyntax,
transform: static (context, _) => (ClassDeclarationSyntax)context.TargetNode);
// Get the JSON schema
// Get the JSON schema and track changes
var jsonSchema = context.AdditionalTextsProvider
.Where(static file => file.Path.EndsWith("en_US\\resources.json"))
.Select((text, _) => (text, text.GetText()))
.Collect();
.Collect()
.WithTrackingName("JsonSchema");
// Combine the JSON schema with the marked classes
var combined = classDeclarations.Combine(jsonSchema);
// Generate the source
// Generate the source only when the JSON schema changes
context.RegisterSourceOutput(combined,
static (spc, source) => Execute(source.Left, source.Right, spc));
}