Amplication AST Libraries Documentation
    Preparing search index...

    Represents a C# interface in the AST. This class handles the generation of C# interface declarations including fields, methods, and their accessibility.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    name: string

    The name of the interface

    namespace: string

    The namespace containing the interface

    access: Access

    The access level of the interface

    partial: boolean

    Whether the interface is partial

    reference: ClassReference

    The class reference for this interface

    isNestedInterface: boolean

    Whether this is a nested interface within another type

    Methods

    • Adds a field to the interface.

      Parameters

      • field: Field

        The field to add

      Returns void

    • Adds a method to the interface.

      Parameters

      • method: Method

        The method to add

      Returns void

    • Gets all methods declared in this interface.

      Returns Method[]

      The array of methods

    • Writes the interface 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