Creates a new Program class.
The configuration arguments for the Program class
Readonly
referencesThe class references used in the program
Readonly
startCode blocks to be written at the start of the file
Readonly
builderCode blocks for builder services configuration
Readonly
appCode blocks for the main application logic
Readonly
catchCode blocks for catch clauses in try-catch blocks
Readonly
finallyCode blocks for finally clauses in try-finally blocks
Readonly
endCode 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.