Class GenerateEntryPointAttribute
Triggers the source generation of the application's entry point (Main method).
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Interface)]
public sealed class GenerateEntryPointAttribute : Attribute
- Inheritance
-
objectAttributeGenerateEntryPointAttribute
Examples
[GenerateEntryPoint]
[BuildDefinition]
public partial class MyBuild : IMyTargets;
Remarks
When this attribute is applied to a class, the source generator creates a Program.cs file
containing a Main method that calls Run<T>(string[]) with the decorated class
as the build definition. This automates the setup of the application's entry point.
Constructors
GenerateEntryPointAttribute()
public GenerateEntryPointAttribute()