SymbolExtensions.Implements Method
Containing Type: SymbolExtensions
Assembly: Roslynator.Core.dll
Overloads
Method | Summary |
---|---|
Implements(ITypeSymbol, INamedTypeSymbol, Boolean) | Returns true if the type implements specified interface. |
Implements(ITypeSymbol, MetadataName, Boolean) | Returns true if the type implements specified interface name. |
Implements(ITypeSymbol, SpecialType, Boolean) | Returns true if the type implements specified interface. |
Implements(ITypeSymbol, INamedTypeSymbol, Boolean)
Returns true if the type implements specified interface.
public static bool Implements(this Microsoft.CodeAnalysis.ITypeSymbol typeSymbol, Microsoft.CodeAnalysis.INamedTypeSymbol interfaceSymbol, bool allInterfaces = false)
Parameters
typeSymbol ITypeSymbol
interfaceSymbol INamedTypeSymbol
allInterfaces Boolean
If true, use ITypeSymbol.AllInterfaces, otherwise use ITypeSymbol.Interfaces.
Returns
Implements(ITypeSymbol, MetadataName, Boolean)
Returns true if the type implements specified interface name.
public static bool Implements(this Microsoft.CodeAnalysis.ITypeSymbol typeSymbol, in Roslynator.MetadataName interfaceName, bool allInterfaces = false)
Parameters
typeSymbol ITypeSymbol
interfaceName MetadataName
allInterfaces Boolean
Returns
Implements(ITypeSymbol, SpecialType, Boolean)
Returns true if the type implements specified interface.
public static bool Implements(this Microsoft.CodeAnalysis.ITypeSymbol typeSymbol, Microsoft.CodeAnalysis.SpecialType interfaceType, bool allInterfaces = false)
Parameters
typeSymbol ITypeSymbol
interfaceType SpecialType
allInterfaces Boolean
If true, use ITypeSymbol.AllInterfaces, otherwise use ITypeSymbol.Interfaces.