Skip to main content

SymbolExtensions.ImplementsInterfaceMember Method

Containing Type: SymbolExtensions

Assembly: Roslynator.Core.dll

Overloads

MethodSummary
ImplementsInterfaceMember(ISymbol, Boolean)Returns true if the symbol implements any interface member.
ImplementsInterfaceMember(ISymbol, INamedTypeSymbol, Boolean)Returns true if the symbol implements any member of the specified interface.
ImplementsInterfaceMember<TSymbol>(ISymbol, Boolean)Returns true if the symbol implements any interface member.
ImplementsInterfaceMember<TSymbol>(ISymbol, INamedTypeSymbol, Boolean)Returns true if the symbol implements any member of the specified interface.

ImplementsInterfaceMember(ISymbol, Boolean)

Returns true if the symbol implements any interface member.

public static bool ImplementsInterfaceMember(this Microsoft.CodeAnalysis.ISymbol symbol, bool allInterfaces = false)

Parameters

symbol ISymbol

allInterfaces Boolean

If true, use ITypeSymbol.AllInterfaces, otherwise use ITypeSymbol.Interfaces.

Returns

Boolean

ImplementsInterfaceMember(ISymbol, INamedTypeSymbol, Boolean)

Returns true if the symbol implements any member of the specified interface.

public static bool ImplementsInterfaceMember(this Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.INamedTypeSymbol interfaceSymbol, bool allInterfaces = false)

Parameters

symbol ISymbol

interfaceSymbol INamedTypeSymbol

allInterfaces Boolean

If true, use ITypeSymbol.AllInterfaces, otherwise use ITypeSymbol.Interfaces.

Returns

Boolean

ImplementsInterfaceMember<TSymbol>(ISymbol, Boolean)

Returns true if the symbol implements any interface member.

public static bool ImplementsInterfaceMember<TSymbol>(this Microsoft.CodeAnalysis.ISymbol symbol, bool allInterfaces = false) where TSymbol : Microsoft.CodeAnalysis.ISymbol

Type Parameters

TSymbol

Parameters

symbol ISymbol

allInterfaces Boolean

If true, use ITypeSymbol.AllInterfaces, otherwise use ITypeSymbol.Interfaces.

Returns

Boolean

ImplementsInterfaceMember<TSymbol>(ISymbol, INamedTypeSymbol, Boolean)

Returns true if the symbol implements any member of the specified interface.

public static bool ImplementsInterfaceMember<TSymbol>(this Microsoft.CodeAnalysis.ISymbol symbol, Microsoft.CodeAnalysis.INamedTypeSymbol interfaceSymbol, bool allInterfaces = false) where TSymbol : Microsoft.CodeAnalysis.ISymbol

Type Parameters

TSymbol

Parameters

symbol ISymbol

interfaceSymbol INamedTypeSymbol

allInterfaces Boolean

If true, use ITypeSymbol.AllInterfaces, otherwise use ITypeSymbol.Interfaces.

Returns

Boolean