Writes text to the buffer with proper indentation. Handles newlines and ensures proper indentation at the start of each line.
The text to write
Writes a line of text to the buffer, adding a newline character.
The text to write (defaults to empty string)
Adds a newline character to the buffer.
Adds a newline character if the last line was not empty.
Increases the indentation level.
Decreases the indentation level.
Adds a class reference to the writer's reference collection.
The class reference to add
Returns the complete string representation of the written content, including any necessary using statements for references.
The complete string representation
A writer class that handles the generation of C# code with proper formatting and indentation. This class implements the IWriter interface and provides methods for writing code with automatic indentation, newline handling, and reference tracking.
Implements