Click or drag to resize

FindByText Class

Represents a search of a CodeDOM tree for all objects containing certain text, including the search parameters and results.
Inheritance Hierarchy
SystemObject
  Nova.AnalysisFindByText

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

The FindByText type exposes the following members.

Constructors
  NameDescription
Public methodFindByText
Create an instance that finds the specified text string using the specified parameters.
Top
Properties
  NameDescription
Public propertyResults
The results of the search.
Public propertyVisitHiddenRefs
Returns false for FindByText, because we don't want to match hidden text.
Top
Methods
  NameDescription
Protected methodAddResult
Protected methodCheck(INamedCodeObject)
Check if the INamedCodeObject is a match.
Protected methodCheck(String, CodeObject)
Check if the CodeObject with the specified text representation 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 fieldMatchCase
True if the search is case-sensitive.
Public fieldMatchComments
True if Comments and DocComments should be matched.
Public fieldMatchDeclarations
True if declarations (INamedCodeObjects) should be matched.
Public fieldMatchLiterals
True if Literals should be matched.
Public fieldMatchMessages
True if Messages should be matched.
Public fieldMatchReferences
True if SymbolicRefs should be matched.
Public fieldMatchWholeWord
True if the search should only match whole words.
Public fieldScope
The starting CodeObject of the search, such as a Solution, Project, or CodeUnit.
Public fieldTargetText
The text being searched for.
Public fieldUseRegularExpressions
True if regular expressions are being used.
Top
Remarks
This is a search of a tree of CodeObjects, NOT a text file search. Text that is searched can include names of declaratons (names of objects implementing INamedCodeObject), SymbolicRef names, and text in Literals, Comments, DocComments, and Messages. Punctuation, operators, and statement keywords are NOT searched by this class, and it matches only individual CodeObjects (not multiple adjacent objects). If you wish to find all CodeObjects of a particular type, see FindByType. 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