ProxyAll for interface part 1...

This commit is contained in:
Stef Heyenrath
2021-07-24 10:05:54 +02:00
parent afe1710816
commit 97fddc2f3f
9 changed files with 127 additions and 56 deletions
@@ -13,17 +13,20 @@ namespace ProxyInterfaceSourceGenerator
public void Initialize(GeneratorInitializationContext context)
{
//if (!System.Diagnostics.Debugger.IsAttached)
//{
// System.Diagnostics.Debugger.Launch();
//}
if (!System.Diagnostics.Debugger.IsAttached)
{
System.Diagnostics.Debugger.Launch();
}
context.RegisterForSyntaxNotifications(() => new ProxySyntaxReceiver());
}
public void Execute(GeneratorExecutionContext ctx)
{
var context = new Context(ctx);
var context = new Context
{
GeneratorExecutionContext = ctx
};
var attributeData = _proxyAttributeGenerator.GenerateFile();
context.GeneratorExecutionContext.AddSource(attributeData.FileName, SourceText.From(attributeData.Text, Encoding.UTF8));