Skip to main content

SymbolExtensions.FindMember Method

Containing Type: SymbolExtensions

Assembly: Roslynator.Core.dll

Overloads

MethodSummary
FindMember<TSymbol>(INamedTypeSymbol, Func<TSymbol, Boolean>, Boolean)Searches for a member that matches the conditions defined by the specified predicate and returns the first occurrence within the type's members.
FindMember<TSymbol>(INamedTypeSymbol, String, Func<TSymbol, Boolean>, Boolean)Searches for a member that has the specified name and matches the conditions defined by the specified predicate, if any, and returns the first occurrence within the type's members.
FindMember<TSymbol>(ITypeSymbol, Func<TSymbol, Boolean>)Searches for a member that matches the conditions defined by the specified predicate, if any, and returns the first occurrence within the type's members.
FindMember<TSymbol>(ITypeSymbol, String, Func<TSymbol, Boolean>)Searches for a member that has the specified name and matches the conditions defined by the specified predicate, if any, and returns the first occurrence within the type's members.

FindMember<TSymbol>(INamedTypeSymbol, Func<TSymbol, Boolean>, Boolean)

Searches for a member that matches the conditions defined by the specified predicate and returns the first occurrence within the type's members.

public static TSymbol? FindMember<TSymbol>(this Microsoft.CodeAnalysis.INamedTypeSymbol typeSymbol, Func<TSymbol, bool> predicate, bool includeBaseTypes = false) where TSymbol : Microsoft.CodeAnalysis.ISymbol

Type Parameters

TSymbol

Parameters

typeSymbol INamedTypeSymbol

predicate Func<TSymbol, Boolean>

includeBaseTypes Boolean

Returns

TSymbol

FindMember<TSymbol>(INamedTypeSymbol, String, Func<TSymbol, Boolean>, Boolean)

Searches for a member that has the specified name and matches the conditions defined by the specified predicate, if any, and returns the first occurrence within the type's members.

public static TSymbol? FindMember<TSymbol>(this Microsoft.CodeAnalysis.INamedTypeSymbol typeSymbol, string name, Func<TSymbol, bool>? predicate = null, bool includeBaseTypes = false) where TSymbol : Microsoft.CodeAnalysis.ISymbol

Type Parameters

TSymbol

Parameters

typeSymbol INamedTypeSymbol

name String

predicate Func<TSymbol, Boolean>

includeBaseTypes Boolean

Returns

TSymbol

FindMember<TSymbol>(ITypeSymbol, Func<TSymbol, Boolean>)

Searches for a member that matches the conditions defined by the specified predicate, if any, and returns the first occurrence within the type's members.

public static TSymbol? FindMember<TSymbol>(this Microsoft.CodeAnalysis.ITypeSymbol typeSymbol, Func<TSymbol, bool>? predicate = null) where TSymbol : Microsoft.CodeAnalysis.ISymbol

Type Parameters

TSymbol

Parameters

typeSymbol ITypeSymbol

predicate Func<TSymbol, Boolean>

Returns

TSymbol

FindMember<TSymbol>(ITypeSymbol, String, Func<TSymbol, Boolean>)

Searches for a member that has the specified name and matches the conditions defined by the specified predicate, if any, and returns the first occurrence within the type's members.

public static TSymbol? FindMember<TSymbol>(this Microsoft.CodeAnalysis.ITypeSymbol typeSymbol, string name, Func<TSymbol, bool>? predicate = null) where TSymbol : Microsoft.CodeAnalysis.ISymbol

Type Parameters

TSymbol

Parameters

typeSymbol ITypeSymbol

name String

predicate Func<TSymbol, Boolean>

Returns

TSymbol