Open sandboxFocus

Interface ITypeComparer

Extends IEqualityComparer<T> of IType with the method IsConvertibleTo(IType, IType, ConversionKind), which checks for type inheritance and not equality.

Namespace: Metalama.Framework.Code.Comparers
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface ITypeComparer : IEqualityComparer<IType>, IEqualityComparer<INamedType>

Methods

Name Description
Is(IType, IType, ConversionKind)
Is(IType, Type, ConversionKind)
IsConvertibleTo(IType, IType, ConversionKind)

Equivalent to the is operator in C#. Gets a value indicating whether the left IType is assignable to right IType.

IsConvertibleTo(IType, Type, ConversionKind)

Equivalent to the is operator in C#. Gets a value indicating whether the left Type is assignable to right Type.

Extension Methods