2023-08-26 18:11:29 +01:00
|
|
|
using Microsoft.CodeAnalysis;
|
2023-04-06 17:00:39 +01: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
|
|
|
|
}
|
|
|
|
}
|