Click or drag to resize

CodeUnit Properties

The CodeUnit type exposes the following members.

Properties
  NameDescription
Public property_AsString
This property is just to make debugging easier.
(Inherited from CodeObject.)
Public propertyAnnotations
Annotations (comments, attributes, directives, messages) associated with the current code object.
(Inherited from CodeObject.)
Public propertyBody
The Block body.
(Inherited from BlockStatement.)
Public propertyCategory
The descriptive category of the code object.
Public propertyCode
The associated text source code if no file is being used.
Public propertyColumnNumber
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.)
Public propertyComment
The comment for the code object (if any).
(Inherited from CodeObject.)
Public propertyDocComment
The documentation comment for the code object (if any).
(Inherited from CodeObject.)
Public propertyEOLComment
The End-Of-Line comment for the code object (if any).
(Inherited from CodeObject.)
Public propertyExpression
The namespace Expression.
(Inherited from NamespaceDecl.)
Public propertyFileEncoding
The encoding of the file (normally UTF8).
Public propertyFileExists
True if the associated file exists.
Public propertyFileHasUTF8BOM
True if the file has a UTF8 byte-order-mark.
Public propertyFileName
The associated file name of the CodeUnit.
Public propertyFileUsingTabs
True if the associated file is formatted using tabs, otherwise false (using spaces).
Public propertyGlobalAlias
The implied global extern alias to the global RootNamespace.
Public propertyHasAnnotations
True if the code object has any annotations.
(Inherited from CodeObject.)
Public propertyHasArgument
True if the Statement has an argument.
(Overrides NamespaceDeclHasArgument.)
Public propertyHasArgumentParens
True if the Statement has parens around its argument.
(Inherited from NamespaceDecl.)
Public propertyHasAttributes
True if the code object has any attributes.
(Inherited from CodeObject.)
Public propertyHasBraces
True if the BlockStatement has braces.
(Inherited from BlockStatement.)
Public propertyHasBracesAlways
True if the BlockStatement always requires braces.
(Overrides BlockStatementHasBracesAlways.)
Public propertyHasComments
True if the code object has any comments of any kind.
(Inherited from CodeObject.)
Public propertyHasCompilerDirectives
True if the code object has any compiler directive annotations.
(Inherited from CodeObject.)
Public propertyHasDocComments
True if the code object has any documentation comments.
(Inherited from CodeObject.)
Public propertyHasEOLComments
True if the code object has any EOL comments.
(Inherited from CodeObject.)
Public propertyHasEOLOrPostAnnotations
True if the code object has any EOL or Postfix annotations.
(Inherited from CodeObject.)
Public propertyHasErrors
True if the code object has any error messages.
(Inherited from CodeObject.)
Public propertyHasFirstOnLineAnnotations
True if the code object has any annotations on separate lines.
(Inherited from CodeObject.)
Public propertyHasHeader
True for all BlockStatements that have a header (all except CodeUnit and BlockDecl).
(Overrides BlockStatementHasHeader.)
Public propertyHasInfixComments
True if the code object has any Infix comments.
(Inherited from CodeObject.)
Public propertyHasMessages
True if the code object has any generated messages.
(Inherited from CodeObject.)
Public propertyHasNoIndentation
Determines if the code object has no indentation.
(Inherited from CodeObject.)
Public propertyHasNonEOLComments
True if the code object has any regular (non-doc) preceding (non-EOL, non-Infix, non-Postfix) comments.
(Inherited from CodeObject.)
Public propertyHasPostAnnotations
True if the code object has any postfix annotations.
(Inherited from CodeObject.)
Public propertyHasTerminator
Determines if the code object has a terminator character.
(Inherited from CodeObject.)
Public propertyHasTerminatorDefault
True if the Statement has a terminator character by default.
(Overrides BlockStatementHasTerminatorDefault.)
Public propertyHiddenRef
Any hidden reference to another CodeObject.
(Inherited from CodeObject.)
Public propertyInfixComment
The infix comment for the code object (if any).
(Inherited from CodeObject.)
Public propertyIsCompactIfEmptyDefault
True if the BlockStatement has compact empty braces by default.
(Inherited from BlockStatement.)
Public propertyIsCSharp
True if the CodeUnit contains C# code.
Public propertyIsEndFirstOnLine
True if the closing paren or bracket is on a new line.
(Inherited from Statement.)
Public propertyIsFile
True if the CodeUnit is associated with a file (as opposed to being only in memory).
Public propertyIsFirstOnLine
Determines if the code object appears as the first item on a line.
(Inherited from CodeObject.)
Public propertyIsFirstOnLineDefault
True if the code object defaults to starting on a new line.
(Inherited from CodeObject.)
Public propertyIsGenerated
Determines if the code object is generated.
(Inherited from CodeObject.)
Public propertyIsGroupingSet
Determines if the 'grouping' (has parens or braces) status has been set.
(Inherited from CodeObject.)
Public propertyIsMethodBodyLevel
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.)
Public propertyIsMultiPart
True for multi-part statements, such as try/catch/finally or if/else.
(Inherited from BlockStatement.)
Public propertyIsNew
True if the CodeUnit is newly created and hasn't been saved yet.
Public propertyIsNewLinesSet
Determines if the newline count has been set on the code object.
(Inherited from CodeObject.)
Public propertyIsRenderable
True if the CodeObject is renderable.
(Overrides CodeObjectIsRenderable.)
Public propertyIsSingleLine
Determines if the code object only requires a single line for display.
(Inherited from NamespaceDecl.)
Public propertyIsSingleLineDefault
True if the code object only requires a single line for display by default.
(Inherited from BlockStatement.)
Public propertyIsTopLevel
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.)
Public propertyIsWorkflowCodeBesideFile
True if this is a workflow code-beside file.
Public propertyKeyword
The keyword associated with the Statement.
(Inherited from NamespaceDecl.)
Public propertyLineNumber
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.)
Public propertyListedAnnotations
All 'listed' code annotations (Messages and special Comments) for this CodeUnit.
Public propertyName
The name of the CodeUnit. If associated with a file, this is the file name and extension.
Public propertyNamespace
The associated Namespace.
(Inherited from NamespaceDecl.)
Public propertyNewLines
The number of newlines preceding the object (0 to N).
(Inherited from Statement.)
Public propertyParent
The parent CodeObject.
(Inherited from NamespaceDecl.)
Public propertyPostfixComment
The postfix comment for the code object (if any).
(Inherited from CodeObject.)
Public propertyProject
The parent Project.
Public propertyRequiresEmptyStatement
True if the BlockStatement requires an empty statement if it has an empty block with no braces.
(Overrides BlockStatementRequiresEmptyStatement.)
Public propertySLOC
"Source Lines Of Code" in the source (when first parsed).
Public propertyTerminator
The terminator character for the Statement.
(Inherited from Statement.)
Public propertyTotalLines
Total number of text lines in the source (when first parsed).
Top
See Also