Add support for base (proxy) class (#29)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
namespace ProxyInterfaceSourceGenerator.Models;
|
||||
|
||||
internal record ClassSymbol(INamedTypeSymbol Symbol, List<INamedTypeSymbol> BaseTypes, List<INamedTypeSymbol> Interfaces)
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return Symbol.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
|
||||
namespace ProxyInterfaceSourceGenerator.Models;
|
||||
|
||||
internal record Context
|
||||
{
|
||||
public GeneratorExecutionContext GeneratorExecutionContext { get; init; }
|
||||
|
||||
// public List<ContextData> GeneratedData { get; } = new List<ContextData>();
|
||||
|
||||
public IDictionary<InterfaceDeclarationSyntax, ProxyData> CandidateInterfaces { get; init; } = default!;
|
||||
|
||||
public Dictionary<string, string> ReplacedTypes { get; } = new Dictionary<string, string>();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace ProxyInterfaceSourceGenerator.Models;
|
||||
|
||||
internal record ContextData
|
||||
{
|
||||
public string? InterfaceName { get; init; }
|
||||
|
||||
public string? ClassName { get; init; }
|
||||
|
||||
public FileData FileData { get; init; } = default!;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace ProxyInterfaceSourceGenerator.Models;
|
||||
|
||||
internal record FileData(string FileName, string Text);
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace ProxyInterfaceSourceGenerator.Models;
|
||||
|
||||
internal record ProxyData
|
||||
(
|
||||
string Namespace,
|
||||
string ShortInterfaceName,
|
||||
string FullInterfaceName,
|
||||
string RawTypeName,
|
||||
string TypeName,
|
||||
List<string> Usings,
|
||||
bool ProxyBaseClasses
|
||||
);
|
||||
Reference in New Issue
Block a user