Creates a new Program class.
The configuration arguments for the Program class
ReadonlyreferencesThe class references used in the program
ReadonlystartCode blocks to be written at the start of the file
ReadonlybuilderCode blocks for builder services configuration
ReadonlyappCode blocks for the main application logic
ReadonlycatchCode blocks for catch clauses in try-catch blocks
ReadonlyfinallyCode blocks for finally clauses in try-finally blocks
ReadonlyendCode blocks to be written at the end of the file
Adds a class reference to the program.
The class reference to add
Writes the Program class declaration to the writer.
The writer to write to
Returns the string representation of the AST node. This method creates a new Writer instance and writes the node's content to it.
The string representation of the AST node
Represents the Program class in a C# application. This class handles the generation of the main program structure including service configuration, application logic, and error handling.