12 references to SyntaxReceiverCreator
Microsoft.CodeAnalysis (10)
SourceGeneration\GeneratorContexts.cs (5)
146
/// Register a <see cref="
SyntaxReceiverCreator
"/> for this generator, which can be used to create an instance of an <see cref="ISyntaxReceiver"/>.
160
/// <param name="receiverCreator">A <see cref="
SyntaxReceiverCreator
"/> that can be invoked to create an instance of <see cref="ISyntaxReceiver"/></param>
161
public void RegisterForSyntaxNotifications(
SyntaxReceiverCreator
receiverCreator)
163
CheckIsEmpty(Callbacks.SyntaxContextReceiverCreator, $"{nameof(
SyntaxReceiverCreator
)} / {nameof(SyntaxContextReceiverCreator)}");
185
CheckIsEmpty(Callbacks.SyntaxContextReceiverCreator, $"{nameof(
SyntaxReceiverCreator
)} / {nameof(SyntaxContextReceiverCreator)}");
SourceGeneration\ISyntaxReceiver.cs (4)
12
/// via a <see cref="
SyntaxReceiverCreator
"/>.
14
/// The compiler will invoke the <see cref="
SyntaxReceiverCreator
"/> prior to generation to
51
/// via a <see cref="
SyntaxReceiverCreator
"/>.
53
/// The compiler will invoke the <see cref="
SyntaxReceiverCreator
"/> prior to generation to
SourceGeneration\SyntaxContextReceiverAdaptor.cs (1)
23
public static SyntaxContextReceiverCreator Create(
SyntaxReceiverCreator
creator) => () =>
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
SourceGeneration\SyntaxAwareGeneratorTests.cs (2)
377
onInit: (i) => i.RegisterForSyntaxNotifications((
SyntaxReceiverCreator
)(() => throw exception)),
589
onInit: (i) => i.RegisterForSyntaxNotifications((
SyntaxReceiverCreator
)(() => null!)),