2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-09-13 12:43:17 +00:00
This commit is contained in:
2025-08-27 16:06:22 +03:00
parent 8f1a29b44e
commit 4c38e0e668
4 changed files with 11 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ namespace Esiur.Proxy;
[Generator]
[System.Diagnostics.CodeAnalysis.SuppressMessage("MicrosoftCodeAnalysisCorrectness", "RS1036:Specify analyzer banned API enforcement setting", Justification = "<Pending>")]
public class ResourceGenerator : ISourceGenerator
public class ResourceGenerator : IIncrementalGenerator
{
private KeyList<string, TypeTemplate[]> cache = new();
@@ -249,4 +249,9 @@ namespace {ci.ClassSymbol.ContainingNamespace.ToDisplayString()} {{
context.AddSource("Error.g.cs", $"/*\r\n{ex}\r\n*/");
}
}
public void Initialize(IncrementalGeneratorInitializationContext context)
{
context.RegisterForSyntaxNotifications(() => new ResourceGeneratorReceiver());
}
}