Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Eligibility / Eligibility­Extensions / Must­Be

Method MustBe

MustBe(IEligibilityBuilder<IType>, Type, ConversionKind)

Requires the target type to be convertible to a given type (specified as a reflection Type).

Declaration
public static void MustBe(this IEligibilityBuilder<IType> eligibilityBuilder, Type type, ConversionKind conversionKind)
Parameters
Type Name Description
IEligibilityBuilder<IType> eligibilityBuilder
Type type
ConversionKind conversionKind

MustBe(IEligibilityBuilder<IType>, IType, ConversionKind)

Requires the target type to be convertible to a given type (specified as an IType).

Declaration
public static void MustBe(this IEligibilityBuilder<IType> eligibilityBuilder, IType type, ConversionKind conversionKind)
Parameters
Type Name Description
IEligibilityBuilder<IType> eligibilityBuilder
IType type
ConversionKind conversionKind

MustBe<T>(IEligibilityBuilder<IType>, ConversionKind)

Requires the target type to be convertible to a given type (specified as a type parameter).

Declaration
public static void MustBe<T>(this IEligibilityBuilder<IType> eligibilityBuilder, ConversionKind conversionKind)
Parameters
Type Name Description
IEligibilityBuilder<IType> eligibilityBuilder
ConversionKind conversionKind
Type Parameters
Name Description
T