CodeWriter Class |
Namespace: Nova.Rendering
public class CodeWriter : IDisposable
The CodeWriter type exposes the following members.
Name | Description | |
---|---|---|
![]() | CodeWriter(Boolean, Boolean) |
Create a code writer that writes to a string.
|
![]() | CodeWriter(String, Encoding, Boolean, Boolean, Boolean) |
Create a code writer that writes to a text file.
|
Name | Description | |
---|---|---|
![]() | AlignmentStateStack |
A stack of CodeWriterAlignmentStates.
|
![]() | ColumnNumber |
The current column number (1 to N).
|
![]() | IndentOffset |
Get or set the current indent offset (0 to N).
|
![]() | IsGenerated |
True if the code being rendered is generated (such as a generated '.g.cs' file). Code cleanup settings will be ignored.
|
![]() | LineNumber |
The current line number (1 to N).
|
![]() | NeedsNewLine |
True if a newline is required before any other text, such as if a compiler directive was just emitted
(used to force a newline before a terminating ';' on an expression with a compiler directive at the end).
|
![]() | NewLine |
Get or set the string used to create new lines (LF or CR/LF).
|
Name | Description | |
---|---|---|
![]() | BeginAlignment |
Begin the association of alignment information with a code object.
|
![]() | BeginIndentOnNewLine |
Begin a section during which any newline should be indented an extra level.
|
![]() | BeginIndentOnNewLineRelativeToCurrentOffset |
Begin a section during which any newline should be indented relative to the current offset.
|
![]() | BeginIndentOnNewLineRelativeToLastIndent |
Begin a section during which any newline should be indented relative to the last indented offset.
|
![]() | BeginIndentOnNewLineRelativeToParentOffset |
Begin a section during which any newline should be indented relative to the parent object offset.
|
![]() | BeginOutdentOnNewLine |
Begin a section during which any newline should be outdented by a certain amount, or to a certain offset.
|
![]() | Dispose |
Dispose the object.
|
![]() | EndAlignment |
End the association of alignment information with a code object.
|
![]() | EndIndentation |
End a section during which any newline should be indented an extra level.
|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | Flush |
Flush any pending data.
|
![]() | FlushPendingEOLComments | |
![]() | GetColumnWidth |
Get the column width associated with the specified CodeObject.
|
![]() | GetColumnWidths |
Get any column widths associated with the specified CodeObject.
|
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetIndentOffset |
Get the indentation offset of the specified code object.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | SetParentOffset |
Set the indent offset of the parent object.
|
![]() | ToString |
Convert all written data to a string.
(Overrides ObjectToString.) |
![]() | Write |
Write the specified text.
|
![]() | WriteIdentifier |
Write an identifier, prefixing with '@' if it happens to be a keyword.
|
![]() | WriteLine |
Write optional text followed by a newline.
|
![]() | WriteLines |
Write the specified number of newlines.
|
![]() | WriteList |
Write a list of CodeObjects.
|
![]() | WriteName |
Render a name, hiding any 'Attribute' suffix if it's an attribute name.
|
![]() | WritePendingEOLComment |
Write a pending EOL comment, to be flushed later once it's known if anything follows it on the same line.
|
Name | Description | |
---|---|---|
![]() | AfterNewLine |
This event is fired after a new line is created.
|
Name | Description | |
---|---|---|
![]() | _alignmentStateStack | |
![]() | _columnNumber | |
![]() | _flushingEOLComments | |
![]() | _indentStateStack | |
![]() | _isEmptyLine | |
![]() | _isGenerated | |
![]() | _lastPoppedIndentState | |
![]() | _lineNumber | |
![]() | _pendingEOLComments | |
![]() | _textWriter | |
![]() | EscapeUnicode |
True if unicode characters should be escaped.
|
![]() | InDocCommentContent |
True if rendering documentation comment content.
|
![]() ![]() | Keywords |
C# keywords.
|
![]() | UseTabs |
True if tabs should be used for indentation instead of spaces.
|