CodeWriter class
namespace: Serenity.Reflection assembly: Serenity.Net.Core
Used to write formatted code to a string builder.
public class CodeWriter
Public Members
| name | description |
|---|---|
| CodeWriter(…) | Initializes a new instance of the CodeWriter class. |
| BraceOnSameLine { get; set; } | Whether to put opening brace on the same line. |
| Block(…) | Increases indent, runs the insideBlock and decreases indent back. |
| EndBrace() | Decreases indent and closes the brace |
| InBrace(…) | Adds a brace, increases indent, runs the inside block, decreases indent back, closes the brace. |
| Indent() | Appends current indent |
| Indented(…) | Appends current indent and the specified string |
| IndentedLine(…) | Appends current indent, the specified string, and a new line. |
| IndentedMultiLine(…) | Appends current indent for all lines of the specified string by splitting it by end of line characters, and a new line. |
| StartBrace() | Adds a brace, increases indent. |
See Also
- Source: CodeWriter.cs