IncrementalGeneratorInitializationContext.RegisterPostInitializationOutput Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers a callback that will be invoked once, before any other source generation occurs. This is typically used to add source code that should be available for subsequent generation steps, such as attribute definitions. Use AddEmbeddedAttributeDefinition() to add the EmbeddedAttribute which marks generated types as internal to the current assembly.
public void RegisterPostInitializationOutput(Action<Microsoft.CodeAnalysis.IncrementalGeneratorPostInitializationContext> callback);
member this.RegisterPostInitializationOutput : Action<Microsoft.CodeAnalysis.IncrementalGeneratorPostInitializationContext> -> unit
Public Sub RegisterPostInitializationOutput (callback As Action(Of IncrementalGeneratorPostInitializationContext))
Parameters
A callback that receives an IncrementalGeneratorPostInitializationContext and can add initial source files