ProxyAll
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using ClassLibrarySourceGen;
|
||||
using System.Text;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using ProxyInterfaceSourceGenerator.FileGenerators;
|
||||
using ProxyInterfaceSourceGenerator.SyntaxReceiver;
|
||||
|
||||
namespace ProxyInterfaceSourceGenerator
|
||||
{
|
||||
@@ -15,9 +13,9 @@ namespace ProxyInterfaceSourceGenerator
|
||||
|
||||
public void Initialize(GeneratorInitializationContext context)
|
||||
{
|
||||
//if (!Debugger.IsAttached)
|
||||
//if (!System.DiagnosticsDebugger.IsAttached)
|
||||
//{
|
||||
// Debugger.Launch();
|
||||
// System.DiagnosticsDebugger.Launch();
|
||||
//}
|
||||
|
||||
context.RegisterForSyntaxNotifications(() => new ProxySyntaxReceiver());
|
||||
@@ -32,9 +30,6 @@ namespace ProxyInterfaceSourceGenerator
|
||||
return;
|
||||
}
|
||||
|
||||
var p = context.Compilation.GetTypeByMetadataName("SourceGeneratorInterface.Person");
|
||||
var ec = context.Compilation.GetTypeByMetadataName("Microsoft.CodeAnalysis.GeneratorExecutionContext");
|
||||
|
||||
var partialInterfacesGenerator = new PartialInterfacesGenerator(context, receiver.CandidateInterfaces);
|
||||
foreach (var data in partialInterfacesGenerator.GenerateFiles())
|
||||
{
|
||||
@@ -115,26 +110,4 @@ namespace ProxyInterfaceSourceGenerator
|
||||
|
||||
public string Name { get => _instance.Name; set => _instance.Name = value; }
|
||||
}
|
||||
|
||||
public interface IPrintable
|
||||
{
|
||||
int Length { get; }
|
||||
int Count { get; }
|
||||
void Print1();
|
||||
void Print2();
|
||||
}
|
||||
|
||||
public class PrinterV1 : IPrintable
|
||||
{
|
||||
public int Length => 100;
|
||||
public int Count => 200;
|
||||
public void Print1()
|
||||
{
|
||||
Console.WriteLine("PrinterV1 - Print1");
|
||||
}
|
||||
public void Print2()
|
||||
{
|
||||
Console.WriteLine("PrinterV1 - Print2");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user