CodeObject Methods |
The CodeObject type exposes the following members.
Name | Description | |
---|---|---|
Accept |
Accept the specified visitor object for the current code object and it's children.
| |
AcceptAnnotations(IVisitor) |
Accept the specified visitor object for all regular (non-EOL, non-Infix, non-Postfix) annotations (comments, attributes, compiler directives).
| |
AcceptAnnotations(IVisitor, AnnotationFlags) |
Accept the specified visitor object for all specified Infix or Postfix annotations (comments, compiler directives).
| |
AcceptEOLComments |
Accept the specified visitor object for all EOL comments.
| |
AcceptInfixComments |
Accept the specified visitor object for all Infix comments.
| |
AcceptInfixEOLComments |
Accept the specified visitor object for all Infix EOL comments.
| |
AdjustCommentIndentation |
Adjust the content of the specified comment to compensate if it was outdented.
| |
AssociateCommentWhenParsing |
Determine if the specified comment should be associated with the current code object during parsing.
| |
AsString |
Render the entire code object as a string, using LFs for newlines.
| |
AsText |
Convert the code object to text with a trailing newline, and using CR/LF pairs for newlines (file format).
| |
AsText(CodeWriter, CodeObjectRenderFlags) | ||
AsText(CodeObjectRenderFlags, Boolean, StackCodeWriterAlignmentState) |
Convert the code object to text using the specified flags and format (file or string).
| |
AsTextAfter | ||
AsTextAnnotations(CodeWriter, CodeObjectRenderFlags) |
Render all regular (non-EOL, non-Infix, non-Postfix, non-Message) annotations (comments, attributes, compiler directives).
| |
AsTextAnnotations(CodeWriter, AnnotationFlags, CodeObjectRenderFlags) |
Render all specified Infix or Postfix annotations (comments, compiler directives).
| |
AsTextBefore | ||
AsTextEOLComments |
Render all EOL comments.
| |
AsTextEvaluatedType | ||
AsTextInfixComments |
Render all Infix comments with the specified mask.
| |
AsTextInfixEOLComments |
Render all Infix EOL comments.
| |
AsTextLeftMostAnnotations |
Render all regular annotations on the current object, or the left most binary operator.
| |
AsTextLength |
Determine the length of the code object if converted to a string using the specified flags.
| |
AttachAnnotation(Annotation, Boolean) |
Attach an Annotation (Comment, DocComment, Attribute,
CompilerDirective, or Message) to the CodeObject.
| |
AttachAnnotation(Annotation, AnnotationFlags, Boolean) |
Attach an Annotation to the CodeObject at the specified position.
| |
AttachComment |
Create a comment object and attach it to the code object.
| |
AttachEOLComment |
Create an EOL comment object and attach it to the code object.
| |
AttachMessage |
Create a message and attach it to the code object.
| |
CalculateMetrics |
Calculate metrics for this code object and its children.
| |
CheckForAlignment |
Check for alignment of any EOL comments.
| |
Clone |
Deep-clone the code object.
| |
CloneField(Object, Object) |
Clone a field of a code object, including setting the parent.
| |
CloneFieldT(T, T) |
Clone a field of a code object, including setting the parent.
| |
CopyFormatting |
Copy formatting from another code object.
| |
CreateAnnotations |
Create the list of child Annotations, or return the existing one.
| |
CreateRef |
Create a reference to the CodeObject.
| |
DefaultFormat |
Default format the code object.
| |
DefaultFormatField |
Default format the specified child field code object.
| |
DefaultNewLines |
Determine a default of 1 or 2 newlines when adding items to a Block.
| |
Dispose |
Dispose the CodeObject.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
EvaluateTypeOrNamespace |
Evaluate the type or namespace associated with the code 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.) | |
FindParentT |
Find the parent object of the specified type.
| |
FindParentMethod |
Find the parent method (or anonymous method or lambda) of the current code object.
| |
FindParentMethodOrType |
Find the parent method (or anonymous method or lambda) or type of the current code object.
| |
ForceReference |
Call this method to force a reference to CodeObject, so that all static members are
initialized, and settings are read from the config file. Call this before changing any static
settings manually, or your changes will be overwritten when the config file is processed.
| |
GetAllChildrenT |
Get an enumerator for all children objects of type T in
the CodeObject and in any child CodeObjects (recursively).
| |
GetAttribute |
Returns the first attribute expression (Call or ConstructorRef) with the specified name on the CodeObject.
| |
GetComment |
Get the comment that satisfies the specified predicate.
| |
GetDescription |
Get a short text description of the CodeObject.
This is generally the shortest text representation that uniquely identifies objects, even if
they have the same name, for example: type or return type, name, type parameters, parameters.
| |
GetDocSummary |
Returns the DocSummary documentation comment, or null if none exists.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetIndentLevel |
Get the indent level of this object.
| |
GetIndentSpaceCount |
Get the current indent in spaces.
| |
GetInferredType |
Determine the type of an inferred ('var') type.
| |
GetNamespace |
Get the Namespace for this CodeObject.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetTypeRef |
Get a TypeRef for the type with the specified full name, with caching (generally used for System types).
| |
GetWorstMessageType |
Get the type of the worst attached message.
| |
HasAnnotationT | ||
HasAttribute |
Returns true if the attribute with the specified name exists on the object, otherwise false.
| |
HasUnresolvedRef |
Returns true if the code object is an UnresolvedRef or has any UnresolvedRef children.
| |
IsChildIndented |
Returns true if the specified child object is indented from the parent.
| |
IsChildPrefix |
Returns true if the specified child object is prefixed to the current object.
| |
LoadSettings |
Load settings for Nova.CodeDOM.dll types from the app config file.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MoveAllComments |
Move all (regular or EOL) comments from the specified token to the current code object, converting any
EOL comments to regular comments (which will be rendered inline if necessary).
| |
MoveAnnotations |
Move any annotations from the specified location to the specified destination location.
| |
MoveComments(Token) |
Move any non-EOL comments from the specified token to the current code object.
| |
MoveComments(Token, Boolean) |
Move any non-EOL comments from the specified token to the current code object.
| |
MoveCommentsAsPost |
Move any non-EOL comments from the specified token to the current code object as Post comments.
| |
MoveEOLAndPostAnnotations |
Move any EOL or Postfix annotations from the specified code object to the current code object.
| |
MoveEOLComment(CodeObject) |
Move any EOL comment from the specified code object to the current code object.
| |
MoveEOLComment(Token) |
Move any EOL comment from the specified token to the current code object.
| |
MoveEOLComment(Token, Boolean, Boolean) |
Move any EOL comment from the specified token to the current code object.
| |
MoveEOLCommentAsInfix |
Move any EOL comment from the specified token to the current code object as an Infix EOL comment.
| |
MoveFormatting(CodeObject) |
Move formatting from the specified code object to the current object.
| |
MoveFormatting(Token) |
Move formatting from the specified token to the current object.
| |
MovePrefixAnnotationsAs |
Move any prefix annotations on the specified code object to the current code object as the specified type of annotation.
| |
NotifyListedAnnotationAdded |
Propagate the listed annotation to the parent CodeUnit and above.
| |
NotifyListedAnnotationRemoved |
Remove the listed annotation from the parent CodeUnit and above.
| |
ParseAnnotations(Parser, CodeObject) |
Parse annotations - specifically, compiler directives around things such as TypeParameters or ParameterDecls.
| |
ParseAnnotations(Parser, CodeObject, Boolean, Boolean) |
Parse any comments, attributes, compiler directives.
| |
ParseExpectedToken |
Parse the specified expected token, attaching a parse error to the current object if it doesn't exist.
| |
ParseUnusedAnnotations |
Parse annotations from the Unused list.
| |
RemoveAllAnnotationsT |
Remove all annotations of the specified type from this object.
| |
RemoveAllAnnotationsWhereT |
Remove all annotations from this object where the specified predicate is true.
| |
RemoveAllMessages |
Remove all messages from this object, or optionally only from the specified source.
| |
RemoveAttribute |
Remove the attribute expression with the specified name.
| |
Resolve(ResolveFlags) |
Resolve all child symbolic references.
| |
Resolve(ResolveCategory, ResolveFlags) |
Resolve all child symbolic references, using the specified ResolveCategory and ResolveFlags.
| |
ResolveAttributes |
Resolve any attached attributes.
| |
ResolveDocComments |
Resolve any references in attached documentation comments.
| |
ResolveGotoTargetUp |
Resolve child code objects that match the specified name are valid goto targets, moving up the tree until a complete match is found.
| |
ResolveRefUp |
Resolve child code objects that match the specified name, moving up the tree until a complete match is found.
| |
ResolveRefUpSkipMethodBody |
Similar to ResolveRefUp(String, Resolver), but skips trying to resolve the symbol in the body or parameters of a
method (used for resolving parameter types).
| |
SetField(Object, Object, Boolean) |
Set a field of a code object, including setting the parent, and optional formatting.
| |
SetFieldT(ChildListT, ChildListT) |
Set a ChildList collection field of a code object, including setting the parent.
| |
SetFieldT(T, T, Boolean) |
Set a field of a code object, including setting the parent, and optional formatting.
| |
SetFirstOnLineForNonEOLComments |
Set the newline flag for all non-EOL comments in the collection.
| |
SetFormatFlag | ||
SetLineCol(CodeObject) |
Set the line and column numbers to those in the specified CodeObject.
| |
SetLineCol(Token) |
Set the line and column numbers to those in the specified token.
| |
SetNewLines |
Special method to set the newline count without setting the NewLinesSet flag.
| |
SetStartLineCol |
Set the starting line and column numbers to those in the specified token (used by
some code objects with prefixes such as modifiers).
| |
ToString |
Render the type of the code object and its description as a string.
(Overrides ObjectToString.) | |
UpdateAllDeclExpressions |
Recursively update the dictionary of names in the specified Block by either adding or removing
(as specified by the 2nd parameter) all appropriate nested INamedCodeObjects expressions in the
current CodeObject tree (specifically implemented for LocalDeclExpr expression objects).
| |
UpdateLineCol |
Update the line and column numbers according to the current positions in the CodeWriter,
if the UpdateLineCol flag is set.
|