2023-08-26 17:11:29 +00:00
|
|
|
using Microsoft.CodeAnalysis;
|
2023-04-06 16:00:39 +00:00
|
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
|
|
|
|
|
namespace SourceGenerator;
|
|
|
|
|
|
|
|
[Generator]
|
|
|
|
internal sealed class MethodOverloadGenerator : ISourceGenerator
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
public void Initialize(GeneratorInitializationContext context)
|
|
|
|
{
|
|
|
|
context.RegisterForSyntaxNotifications(() => new OverloadSyntaxReceiver());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
public void Execute(GeneratorExecutionContext context)
|
|
|
|
{
|
|
|
|
var syntaxReceiver = (OverloadSyntaxReceiver)context.SyntaxReceiver!;
|
|
|
|
IReadOnlyList<MethodDeclarationSyntax> candidateMethods = syntaxReceiver.CandidateMethods;
|
|
|
|
// TODO implement
|
|
|
|
}
|
|
|
|
}
|