Click or drag to resize

FindReferences Class

Represents a search of a CodeDOM tree for references (SymbolicRefs) to a target object, and the search results.
Inheritance Hierarchy
SystemObject
  Nova.AnalysisFindReferences

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

The FindReferences type exposes the following members.

Constructors
  NameDescription
Public methodFindReferences
Create an instance that searches for references to the specified target object.
Top
Properties
  NameDescription
Public propertyResults
The results of the search.
Public propertyTarget
Public propertyVisitHiddenRefs
Returns true for FindReferences, because we want to check any hidden references.
Top
Methods
  NameDescription
Protected methodAddResult
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_declaringTypeRef
Protected field_isInterface
Protected field_isType
Protected field_results
Protected field_target
The target object for which references should be found.
Protected field_targetName
Protected field_targetTypeRef
Public fieldIncludeDerivedTypes
True if derived types should be included if searching for references to a type, or implementing types and extending interfaces if the target type is an interface.
Public fieldIncludeMemberReferences
True if references to members should be included if searching for references to a type.
Public fieldIncludeOverloads
True if overload declarations should be included if searching for references to a method (or constructor), and any references to those overloads if IncludeReferences is true.
Public fieldIncludeOverrides
True if override declarations should be included if searching for references to a method or property (or indexer or event). References to overrides are always included if IncludeReferences is true, regardless of this setting.
Public fieldIncludeReferences
True if references to the target should be included (can be turned off when other options are used).
Public fieldScope
The starting CodeObject of the search, such as a Solution, Project, or CodeUnit.
Top
Remarks
The target object is usually a declaration, such as a TypeDecl, MethodDecl, FieldDecl, LocalDecl, etc. Or, it can be an external object, such as a TypeDefinition/Type, MethodDefinition/MethodInfo, etc. It can also be a string representing an UnresolvedRef. 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