MetalamaAPI documentationAspect APIMetalama.​Framework.​EligibilityEligibility­ExtensionsMust­Be­Of­Any­Type
Open sandboxFocus

EligibilityExtensions.MustBeOfAnyType Method

MustBeOfAnyType<T>(IEligibilityBuilder<T>, Type[])

Requires the validated object to be of one of the specified types. Note that this validates the object itself, not the declaration that it represents. For instance, if the object is an IParameter and the types parameter is set to string, this method will fail with an exception no conversion exists from IParameter to string.

Declaration
public static void MustBeOfAnyType<T>(this IEligibilityBuilder<T> eligibilityBuilder, params Type[] types)
where T : class
Parameters
Type Name Description
IEligibilityBuilder<T> eligibilityBuilder
Type[] types
Type Parameters
Name Description
T