Click or drag to resize

FindByType Class

Represents a search of a CodeDOM tree for all objects of a certain Type, and the search results.
Inheritance Hierarchy
SystemObject
  Nova.AnalysisFindByType

Namespace:  Nova.Analysis
Assembly:  Nova.CodeDOM (in Nova.CodeDOM.dll) Version: 7.44.8391.13415
Syntax
C#
public class FindByType : IVisitor

The FindByType type exposes the following members.

Constructors
  NameDescription
Public methodFindByType
Create an instance that searches for objects of the specified target type.
Top
Properties
  NameDescription
Public propertyResults
The results of the search.
Public propertyVisitHiddenRefs
Returns true for FindByType, because we want to check any hidden references.
Top
Methods
  NameDescription
Protected methodCheck
Check if the CodeObject is a match.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFind
Perform the search operation.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString (Overrides ObjectToString.)
Public methodVisit(Alias)
Visit an Alias statement.
Public methodVisit(AnonymousMethodBase)
Visit an AnonymousMethodBase expression (common base of LambdaExpression, AnonymousMethod).
Public methodVisit(ArgumentsOperator)
Visit an ArgumentsOperator operator (common base of Call, Index, NewOperator).
Public methodVisit(Attribute)
Visit an Attribute annotation.
Public methodVisit(BinaryOperator)
Public methodVisit(Block)
Visit a Block body of a BlockStatement - this should rarely be used, since all members of the Block will be visited separately.
Public methodVisit(BlockDecl)
Visit a BlockDecl statement.
Public methodVisit(Break)
Visit a Break statement.
Public methodVisit(Catch)
Visit a Catch statement.
Public methodVisit(CheckedBlock)
Visit a CheckedBlock statement.
Public methodVisit(CodeUnit)
Visit a CodeUnit.
Public methodVisit(Comment)
Visit a Comment annotation.
Public methodVisit(CompilerDirective)
Public methodVisit(Conditional)
Visit a Conditional operator.
Public methodVisit(ConstraintClause)
Public methodVisit(Continue)
Visit a Continue statement.
Public methodVisit(DocComment)
Public methodVisit(Else)
Visit an Else statement.
Public methodVisit(EnumMemberDecl)
Visit an EnumMemberDecl statement.
Public methodVisit(ExternAlias)
Visit an ExternAlias statement.
Public methodVisit(FieldDecl)
Public methodVisit(Finally)
Visit a Finally statement.
Public methodVisit(Fixed)
Visit a Fixed statement.
Public methodVisit(For)
Visit a For statement.
Public methodVisit(ForEach)
Visit a ForEach statement.
Public methodVisit(Goto)
Visit a Goto statement.
Public methodVisit(IfBase)
Visit an IfBase statement (common base of If, ElseIf).
Public methodVisit(Initializer)
Visit an Initializer expression.
Public methodVisit(Label)
Visit a Label statement.
Public methodVisit(Literal)
Visit a Literal expression.
Public methodVisit(LocalDecl)
Visit a LocalDecl statement (also MultiLocalDecl).
Public methodVisit(LocalDeclExpr)
Visit an LocalDeclExpr expression.
Public methodVisit(Lock)
Visit a Lock statement.
Public methodVisit(Message)
Visit a Message annotation.
Public methodVisit(MethodDeclBase)
Public methodVisit(NamedArgument)
Visit a NamedArgument expression.
Public methodVisit(NamespaceDecl)
Visit a NamespaceDecl statement (does NOT include CodeUnits).
Public methodVisit(Ordering)
Visit an Ordering expression (children of OrderByClause).
Public methodVisit(ParameterDecl)
Public methodVisit(Project)
Visit a Project.
Public methodVisit(PropertyDeclBase)
Visit a PropertyDeclBase statement (common base of PropertyDecl, IndexerDecl, EventDecl).
Public methodVisit(QueryBodyBase)
Visit a QueryBodyBase expression (common base of QueryExpression, QueryContinuation).
Public methodVisit(QueryClauseBase)
Public methodVisit(Return)
Visit a Return statement.
Public methodVisit(SingleArgumentOperator)
Visit a SingleArgumentOperator operator (common base of Ref, Out, Checked, Unchecked, TypeOf, SizeOf, DefaultValue).
Public methodVisit(Switch)
Visit a Switch statement.
Public methodVisit(SwitchItem)
Visit a SwitchItem statement (common base of Case, Default).
Public methodVisit(SymbolicRef)
Public methodVisit(Throw)
Visit a Throw statement.
Public methodVisit(ThrowExpr)
Visit an ThrowExpr expression.
Public methodVisit(Try)
Visit a Try statement.
Public methodVisit(TypeDecl)
Visit a TypeDecl statement (common base of ClassDecl, StructDecl, InterfaceDecl, EnumDecl, DelegateDecl).
Public methodVisit(TypeParameter)
Visit a TypeParameter.
Public methodVisit(TypeParameterConstraint)
Public methodVisit(UnaryOperator)
Public methodVisit(UncheckedBlock)
Visit an UncheckedBlock statement.
Public methodVisit(Unrecognized)
Visit an Unrecognized expression.
Public methodVisit(Unsafe)
Visit an Unsafe statement.
Public methodVisit(Using)
Visit a Using statement.
Public methodVisit(UsingDirective)
Visit a UsingDirective statement.
Public methodVisit(While)
Visit a While statement.
Public methodVisit(YieldStatement)
Visit a YieldStatement statement.
Public methodVisitT(ChildListT)
Top
Fields
  NameDescription
Protected field_currentCodeUnit
Protected field_results
Public fieldScope
The starting CodeObject of the search, such as a Solution, Project, or CodeUnit.
Public fieldTargetType
The target Type of objects to be found.
Top
Remarks
This class can be used to find all TypeDecls, If statements, LocalDecls, Conditional operators, etc. in the desired scope. To perform a search, create an instance of this class, set any desired search parameters, call Find, and then look at Results. You may bind the Results property to a UI control, and the Find method may be called on a background thread.
See Also