C# 클래스 ICSharpCode.NRefactory.CSharp.Resolver.FindReferences

'Find references' implementation.
This class is thread-safe. The intended multi-threaded usage is to call GetSearchScopes() once, and then call FindReferencesInFile() concurrently on multiple threads (parallel foreach over all interesting files).
파일 보기 프로젝트 열기: 0xd4d/NRefactory 1 사용 예제들

공개 메소드들

메소드 설명
FindLocalReferences ( IVariable variable, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree, ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void

Finds all references of a given variable.

FindReferencesInFile ( IFindReferenceSearchScope searchScope, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void

Finds all references in the given file.

FindReferencesInFile ( IFindReferenceSearchScope searchScope, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree, ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void

Finds all references in the given file.

FindReferencesInFile ( IList searchScopes, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void

Finds all references in the given file.

FindReferencesInFile ( IList searchScopes, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree, ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void

Finds all references in the given file.

GetEffectiveAccessibility ( IEntity entity ) : Accessibility

Gets the effective accessibility of the specified entity - that is, the accessibility viewed from the top level.

internal member in public class -> internal public member in internal class -> internal protected member in public class -> protected protected member in internal class -> protected and internal

GetInterestingFiles ( IFindReferenceSearchScope searchScope, ICompilation compilation ) : IEnumerable

Gets the file names that possibly contain references to the element being searched for.

GetNodeToReplace ( AstNode node ) : AstNode
GetSearchScopes ( IEnumerable symbols ) : IList
GetSearchScopes ( ISymbol symbol ) : IList
RenameReferencesInFile ( IList searchScopes, string newName, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver, Action callback, Action errorCallback, CancellationToken cancellationToken = default(CancellationToken) ) : void

비공개 메소드들

메소드 설명
FindAwaiterIsCompletedReferences ( IProperty property ) : SearchScope
FindBinaryOperator ( IMethod op, BinaryOperatorType operatorType ) : SearchScope
FindChainedConstructorReferences ( IMethod ctor ) : SearchScope
FindEnumeratorCurrentReferences ( IProperty property ) : SearchScope
FindIndexerReferences ( IProperty indexer ) : SearchScope
FindMemberReferences ( IEntity member, FindMemberReferencesNavigator>.Func factory ) : SearchScope
FindObjectCreateReferences ( IMethod ctor ) : SearchScope
FindOperator ( IMethod op, FindReferenceNavigator>.Func factory ) : SearchScope
FindTypeDefinitionReferences ( ITypeDefinition typeDefinition, bool findTypeReferencesEvenIfAliased, SearchScope &additionalScope ) : SearchScope
FindTypeDefinitionReferences ( ITypeDefinition typeDefinition, string searchTerm ) : SearchScope
FindTypeParameterReferences ( IType typeParameter, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree, ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void
FindUnaryOperator ( IMethod op, UnaryOperatorType operatorType ) : SearchScope
GetInterestingFilesProtected ( ITypeDefinition referencedTypeDefinition ) : IEnumerable
GetSearchScopeForDestructor ( IMethod dtor ) : SearchScope
GetSearchScopeForLocalVariable ( IVariable variable ) : SearchScope
GetSearchScopeForMethod ( IMethod method ) : SearchScope
GetSearchScopeForNamespace ( INamespace ns ) : SearchScope
GetSearchScopeForOperator ( IMethod op ) : SearchScope
GetSearchScopeForParameter ( IParameter parameter ) : SearchScope
GetSearchScopeForTypeParameter ( ITypeParameter tp ) : SearchScope
GetTopLevelTypeDefinition ( IEntity entity ) : ITypeDefinition
IsMemberMatch ( IMember member, IMember referencedMember, bool isVirtualCall ) : bool
MergeAccessibility ( Accessibility outer, Accessibility inner ) : Accessibility
NormalizeMember ( IMember member ) : IMember

메소드 상세

FindLocalReferences() 공개 메소드

Finds all references of a given variable.
public FindLocalReferences ( IVariable variable, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree, ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void
variable IVariable The variable for which to look.
unresolvedFile CSharpUnresolvedFile The type system representation of the file being searched.
syntaxTree SyntaxTree The syntax tree of the file being searched.
compilation ICompilation The compilation.
callback FoundReferenceCallback Callback used to report the references that were found.
cancellationToken System.Threading.CancellationToken Cancellation token that may be used to cancel the operation.
리턴 void

FindReferencesInFile() 공개 메소드

Finds all references in the given file.
public FindReferencesInFile ( IFindReferenceSearchScope searchScope, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void
searchScope IFindReferenceSearchScope The search scope for which to look.
resolver ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver AST resolver for the file to search in.
callback FoundReferenceCallback Callback used to report the references that were found.
cancellationToken System.Threading.CancellationToken CancellationToken that may be used to cancel the operation.
리턴 void

FindReferencesInFile() 공개 메소드

Finds all references in the given file.
public FindReferencesInFile ( IFindReferenceSearchScope searchScope, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree, ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void
searchScope IFindReferenceSearchScope The search scope for which to look.
unresolvedFile CSharpUnresolvedFile The type system representation of the file being searched.
syntaxTree SyntaxTree The syntax tree of the file being searched.
compilation ICompilation The compilation for the project that contains the file.
callback FoundReferenceCallback Callback used to report the references that were found.
cancellationToken System.Threading.CancellationToken CancellationToken that may be used to cancel the operation.
리턴 void

FindReferencesInFile() 공개 메소드

Finds all references in the given file.
public FindReferencesInFile ( IList searchScopes, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void
searchScopes IList The search scopes for which to look.
resolver ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver AST resolver for the file to search in.
callback FoundReferenceCallback Callback used to report the references that were found.
cancellationToken System.Threading.CancellationToken CancellationToken that may be used to cancel the operation.
리턴 void

FindReferencesInFile() 공개 메소드

Finds all references in the given file.
public FindReferencesInFile ( IList searchScopes, CSharpUnresolvedFile unresolvedFile, SyntaxTree syntaxTree, ICompilation compilation, FoundReferenceCallback callback, CancellationToken cancellationToken ) : void
searchScopes IList The search scopes for which to look.
unresolvedFile CSharpUnresolvedFile The type system representation of the file being searched.
syntaxTree SyntaxTree The syntax tree of the file being searched.
compilation ICompilation The compilation for the project that contains the file.
callback FoundReferenceCallback Callback used to report the references that were found.
cancellationToken System.Threading.CancellationToken CancellationToken that may be used to cancel the operation.
리턴 void

GetEffectiveAccessibility() 공개 정적인 메소드

Gets the effective accessibility of the specified entity - that is, the accessibility viewed from the top level.
internal member in public class -> internal public member in internal class -> internal protected member in public class -> protected protected member in internal class -> protected and internal
public static GetEffectiveAccessibility ( IEntity entity ) : Accessibility
entity IEntity
리턴 Accessibility

GetInterestingFiles() 공개 메소드

Gets the file names that possibly contain references to the element being searched for.
public GetInterestingFiles ( IFindReferenceSearchScope searchScope, ICompilation compilation ) : IEnumerable
searchScope IFindReferenceSearchScope
compilation ICompilation
리턴 IEnumerable

GetNodeToReplace() 공개 정적인 메소드

public static GetNodeToReplace ( AstNode node ) : AstNode
node AstNode
리턴 AstNode

GetSearchScopes() 공개 메소드

public GetSearchScopes ( IEnumerable symbols ) : IList
symbols IEnumerable
리턴 IList

GetSearchScopes() 공개 메소드

public GetSearchScopes ( ISymbol symbol ) : IList
symbol ISymbol
리턴 IList

RenameReferencesInFile() 공개 메소드

public RenameReferencesInFile ( IList searchScopes, string newName, ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver resolver, Action callback, Action errorCallback, CancellationToken cancellationToken = default(CancellationToken) ) : void
searchScopes IList
newName string
resolver ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver
callback Action
errorCallback Action
cancellationToken System.Threading.CancellationToken
리턴 void