IncrementalGeneratorPostInitializationContext.AddEmbeddedAttributeDefinition 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.
Adds a SourceText to the compilation containing the definition of Microsoft.CodeAnalysis.EmbeddedAttribute.
The source will have a hintName of Microsoft.CodeAnalysis.EmbeddedAttribute.
public void AddEmbeddedAttributeDefinition();
member this.AddEmbeddedAttributeDefinition : unit -> unit
Public Sub AddEmbeddedAttributeDefinition ()
Remarks
This attribute can be used to mark a type as being only visible to the current assembly. Most commonly, any types provided during this IncrementalGeneratorPostInitializationContext should be marked with this attribute to prevent them from being used by other assemblies. The attribute will prevent any downstream assemblies from consuming the type.