CodeUnit Properties |
The CodeUnit type exposes the following members.
Name | Description | |
---|---|---|
![]() | _AsString |
This property is just to make debugging easier.
(Inherited from CodeObject.) |
![]() | Annotations |
Annotations (comments, attributes, directives, messages) associated with the current code object.
(Inherited from CodeObject.) |
![]() | Body |
The Block body.
(Inherited from BlockStatement.) |
![]() | Category |
The descriptive category of the code object.
|
![]() | Code |
The associated text source code if no file is being used.
|
![]() | ColumnNumber |
The column number of a CodeUnit is normally 0, but may be set to a non-zero value to indicate
the base offset of a code fragment being parsed within a larger code fragment or file. If the column is set
to a non-zero value, NewLines will be automatically set to 0, and the first parsed token will have IsNewLine
set to false.
(Overrides CodeObjectColumnNumber.) |
![]() | Comment |
The comment for the code object (if any).
(Inherited from CodeObject.) |
![]() | DocComment |
The documentation comment for the code object (if any).
(Inherited from CodeObject.) |
![]() | EOLComment |
The End-Of-Line comment for the code object (if any).
(Inherited from CodeObject.) |
![]() | Expression |
The namespace Expression.
(Inherited from NamespaceDecl.) |
![]() | FileEncoding |
The encoding of the file (normally UTF8).
|
![]() | FileExists |
True if the associated file exists.
|
![]() | FileHasUTF8BOM |
True if the file has a UTF8 byte-order-mark.
|
![]() | FileName |
The associated file name of the CodeUnit.
|
![]() | FileUsingTabs |
True if the associated file is formatted using tabs, otherwise false (using spaces).
|
![]() | GlobalAlias |
The implied global extern alias to the global RootNamespace.
|
![]() | HasAnnotations |
True if the code object has any annotations.
(Inherited from CodeObject.) |
![]() | HasArgument |
True if the Statement has an argument.
(Overrides NamespaceDeclHasArgument.) |
![]() | HasArgumentParens |
True if the Statement has parens around its argument.
(Inherited from NamespaceDecl.) |
![]() | HasAttributes |
True if the code object has any attributes.
(Inherited from CodeObject.) |
![]() | HasBraces |
True if the BlockStatement has braces.
(Inherited from BlockStatement.) |
![]() | HasBracesAlways |
True if the BlockStatement always requires braces.
(Overrides BlockStatementHasBracesAlways.) |
![]() | HasComments |
True if the code object has any comments of any kind.
(Inherited from CodeObject.) |
![]() | HasCompilerDirectives |
True if the code object has any compiler directive annotations.
(Inherited from CodeObject.) |
![]() | HasDocComments |
True if the code object has any documentation comments.
(Inherited from CodeObject.) |
![]() | HasEOLComments |
True if the code object has any EOL comments.
(Inherited from CodeObject.) |
![]() | HasEOLOrPostAnnotations |
True if the code object has any EOL or Postfix annotations.
(Inherited from CodeObject.) |
![]() | HasErrors |
True if the code object has any error messages.
(Inherited from CodeObject.) |
![]() | HasFirstOnLineAnnotations |
True if the code object has any annotations on separate lines.
(Inherited from CodeObject.) |
![]() | HasHeader | (Overrides BlockStatementHasHeader.) |
![]() | HasInfixComments |
True if the code object has any Infix comments.
(Inherited from CodeObject.) |
![]() | HasMessages |
True if the code object has any generated messages.
(Inherited from CodeObject.) |
![]() | HasNoIndentation |
Determines if the code object has no indentation.
(Inherited from CodeObject.) |
![]() | HasNonEOLComments |
True if the code object has any regular (non-doc) preceding (non-EOL, non-Infix, non-Postfix) comments.
(Inherited from CodeObject.) |
![]() | HasPostAnnotations |
True if the code object has any postfix annotations.
(Inherited from CodeObject.) |
![]() | HasTerminator |
Determines if the code object has a terminator character.
(Inherited from CodeObject.) |
![]() | HasTerminatorDefault |
True if the Statement has a terminator character by default.
(Overrides BlockStatementHasTerminatorDefault.) |
![]() | HiddenRef |
Any hidden reference to another CodeObject.
(Inherited from CodeObject.) |
![]() | InfixComment |
The infix comment for the code object (if any).
(Inherited from CodeObject.) |
![]() | IsCompactIfEmptyDefault |
True if the BlockStatement has compact empty braces by default.
(Inherited from BlockStatement.) |
![]() | IsCSharp |
True if the CodeUnit contains C# code.
|
![]() | IsEndFirstOnLine |
True if the closing paren or bracket is on a new line.
(Inherited from Statement.) |
![]() | IsFile |
True if the CodeUnit is associated with a file (as opposed to being only in memory).
|
![]() | IsFirstOnLine |
Determines if the code object appears as the first item on a line.
(Inherited from CodeObject.) |
![]() | IsFirstOnLineDefault |
True if the code object defaults to starting on a new line.
(Inherited from CodeObject.) |
![]() | IsGenerated |
Determines if the code object is generated.
(Inherited from CodeObject.) |
![]() | IsGroupingSet |
Determines if the 'grouping' (has parens or braces) status has been set.
(Inherited from CodeObject.) |
![]() | IsMethodBodyLevel |
True if a BlockStatement is at a method body level (contains general code statements).
For example, anything at a MethodDeclBase level or lower in the code tree. Specifically, NOT
a NamespaceDecl, TypeDecl, or PropertyDeclBase.
(Inherited from NamespaceDecl.) |
![]() | IsMultiPart |
True for multi-part statements, such as try/catch/finally or if/else.
(Inherited from BlockStatement.) |
![]() | IsNew |
True if the CodeUnit is newly created and hasn't been saved yet.
|
![]() | IsNewLinesSet |
Determines if the newline count has been set on the code object.
(Inherited from CodeObject.) |
![]() | IsRenderable |
True if the CodeObject is renderable.
(Overrides CodeObjectIsRenderable.) |
![]() | IsSingleLine |
Determines if the code object only requires a single line for display.
(Inherited from NamespaceDecl.) |
![]() | IsSingleLineDefault |
True if the code object only requires a single line for display by default.
(Inherited from BlockStatement.) |
![]() | IsTopLevel |
True if a BlockStatement is at the top level (those that have no header and no indent).
For example, a CodeUnit, a BlockDecl with no parent or a DocComment
or Project parent.
(Overrides BlockStatementIsTopLevel.) |
![]() | IsWorkflowCodeBesideFile |
True if this is a workflow code-beside file.
|
![]() | Keyword |
The keyword associated with the Statement.
(Inherited from NamespaceDecl.) |
![]() | LineNumber |
The line number of a CodeUnit is normally 0, but may be set to a non-zero value to indicate
the base offset of a code fragment being parsed within a larger code fragment or file.
(Overrides CodeObjectLineNumber.) |
![]() | ListedAnnotations | |
![]() | Name |
The name of the CodeUnit. If associated with a file, this is the file name and extension.
|
![]() | Namespace |
The associated Namespace.
(Inherited from NamespaceDecl.) |
![]() | NewLines |
The number of newlines preceding the object (0 to N).
(Inherited from Statement.) |
![]() | Parent |
The parent CodeObject.
(Inherited from NamespaceDecl.) |
![]() | PostfixComment |
The postfix comment for the code object (if any).
(Inherited from CodeObject.) |
![]() | Project |
The parent Project.
|
![]() | RequiresEmptyStatement |
True if the BlockStatement requires an empty statement if it has an empty block with no braces.
(Overrides BlockStatementRequiresEmptyStatement.) |
![]() | SLOC |
"Source Lines Of Code" in the source (when first parsed).
|
![]() | Terminator |
The terminator character for the Statement.
(Inherited from Statement.) |
![]() | TotalLines |
Total number of text lines in the source (when first parsed).
|