Amplication AST Libraries Documentation
    Preparing search index...

    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.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    references: ClassReference[]

    The class references used in the program

    startFileBlocks: CodeBlock[]

    Code blocks to be written at the start of the file

    builderServicesBlocks: CodeBlock[]

    Code blocks for builder services configuration

    appBlocks: CodeBlock[]

    Code blocks for the main application logic

    catchBlocks: CodeBlock[]

    Code blocks for catch clauses in try-catch blocks

    finallyBlocks: CodeBlock[]

    Code blocks for finally clauses in try-finally blocks

    endFileBlocks: CodeBlock[]

    Code blocks to be written at the end of the file

    Methods

    • Adds a class reference to the program.

      Parameters

      Returns void

    • Writes the Program class declaration to the writer.

      Parameters

      • writer: Writer

        The writer to write to

      Returns void

    • Returns the string representation of the AST node. This method creates a new Writer instance and writes the node's content to it.

      Returns string

      The string representation of the AST node