Click or drag to resize

CodeObjectFormatFlags Enumeration

Formatting flags.

Namespace:  Nova.CodeDOM
Assembly:  Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax
C#
[FlagsAttribute]
public enum FormatFlags
Members
  Member nameValueDescription
None0No formatting flags.
NewLineMask127Newline count bit field mask (0 to 255 newlines precede the object).
NewLinesSet256Indicates that the newline count has been specifically set vs defaulted.
InfixNewLine512Used 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 ')'.
NoIndentation1024Render the object with no indentation (for left-justified comments, initializers, anonymous methods, conditionals).
Terminator2048Render a terminator after the statement or expression.
Grouping4096Render parens/braces (for Expressions/Blocks) around the code object.
GroupingSet8192Indicates that the grouping flag has been specifically set vs defaulted.
Special16384Used for special behavior, such as lambda expression formatting of a PropertyDecl/MethodDecl.
Generated32768Code object is "compiler" generated (used for default constructors, implied value parameters, delegate invoke methods, etc).
NonFormatting49152Flags 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