CodeObjectFormatFlags Enumeration |
Formatting flags.
Namespace:
Nova.CodeDOM
Assembly:
Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax [FlagsAttribute]
public enum FormatFlags
Members
| Member name | Value | Description |
---|
| None | 0 | No formatting flags. |
| NewLineMask | 127 | Newline count bit field mask (0 to 255 newlines precede the object). |
| NewLinesSet | 256 | Indicates that the newline count has been specifically set vs defaulted. |
| InfixNewLine | 512 | Used by Blocks/Initializers to represent a newline before the '{', as the NewLineMask area is used for newlines before the '}'.
Used by objects with parens to represent a newline before the closing ')'. |
| NoIndentation | 1024 | Render the object with no indentation (for left-justified comments, initializers, anonymous methods, conditionals). |
| Terminator | 2048 | Render a terminator after the statement or expression. |
| Grouping | 4096 | Render parens/braces (for Expressions/Blocks) around the code object. |
| GroupingSet | 8192 | Indicates that the grouping flag has been specifically set vs defaulted. |
| Special | 16384 | Used for special behavior, such as lambda expression formatting of a PropertyDecl/MethodDecl. |
| Generated | 32768 | Code object is "compiler" generated (used for default constructors, implied value parameters, delegate invoke methods, etc). |
| NonFormatting | 49152 | Flags that aren't formatting related. |
Remarks
Code objects contain some minimal formatting information used to control their "display" (whether as text
or in a GUI), such as line breaks, parentheses, braces, and termination characters.
When existing code is parsed, existing formatting is replicated as much as possible. When code objects are
manually created or modified, formatting is defaulted, but if certain settings are specifically set (such
as newlines and parens/braces), then those settings must override the default formatting. Some of these
flags actually have nothing to do with formatting (such as Generated or Special), and are always preserved
by the formatting logic.
See Also