Compilation.GetSymbolsWithName Method

Definition

Overloads

GetSymbolsWithName(Func<String,Boolean>, SymbolFilter, CancellationToken)

Return source declaration symbols whose name meets given predicate.

GetSymbolsWithName(String, SymbolFilter, CancellationToken)

Return source declaration symbols whose name matches the provided name. This may be faster than GetSymbolsWithName(Func<String,Boolean>, SymbolFilter, CancellationToken) when predicate is just a simple string check. name is case sensitive or not depending on the target language.

GetSymbolsWithName(Func<String,Boolean>, SymbolFilter, CancellationToken)

Return source declaration symbols whose name meets given predicate.

public abstract System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ISymbol> GetSymbolsWithName (Func<string,bool> predicate, Microsoft.CodeAnalysis.SymbolFilter filter = Microsoft.CodeAnalysis.SymbolFilter.TypeAndMember, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSymbolsWithName : Func<string, bool> * Microsoft.CodeAnalysis.SymbolFilter * System.Threading.CancellationToken -> seq<Microsoft.CodeAnalysis.ISymbol>
Public MustOverride Function GetSymbolsWithName (predicate As Func(Of String, Boolean), Optional filter As SymbolFilter = Microsoft.CodeAnalysis.SymbolFilter.TypeAndMember, Optional cancellationToken As CancellationToken = Nothing) As IEnumerable(Of ISymbol)

Parameters

predicate
Func<String,Boolean>
filter
SymbolFilter
cancellationToken
CancellationToken

Returns

Applies to

GetSymbolsWithName(String, SymbolFilter, CancellationToken)

Return source declaration symbols whose name matches the provided name. This may be faster than GetSymbolsWithName(Func<String,Boolean>, SymbolFilter, CancellationToken) when predicate is just a simple string check. name is case sensitive or not depending on the target language.

public abstract System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.ISymbol> GetSymbolsWithName (string name, Microsoft.CodeAnalysis.SymbolFilter filter = Microsoft.CodeAnalysis.SymbolFilter.TypeAndMember, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSymbolsWithName : string * Microsoft.CodeAnalysis.SymbolFilter * System.Threading.CancellationToken -> seq<Microsoft.CodeAnalysis.ISymbol>
Public MustOverride Function GetSymbolsWithName (name As String, Optional filter As SymbolFilter = Microsoft.CodeAnalysis.SymbolFilter.TypeAndMember, Optional cancellationToken As CancellationToken = Nothing) As IEnumerable(Of ISymbol)

Parameters

name
String
filter
SymbolFilter
cancellationToken
CancellationToken

Returns

Applies to