private static void DecoratesBaseTypes(Type serviceType, ConstructorInfo decoratorConstructor, string paramName) { bool decoratesBaseTypes = DecoratorHelpers.DecoratesBaseTypes(serviceType, decoratorConstructor); if (!decoratesBaseTypes) { ThrowMustDecorateBaseType(serviceType, decoratorConstructor, paramName); } }
// TODO: Find out if the call to DecoratesBaseTypes is needed (all tests pass without it). internal static bool IsDecorator(Type serviceType, ConstructorInfo implementationConstructor) => DecoratorHelpers.DecoratesServiceType(serviceType, implementationConstructor) && DecoratorHelpers.DecoratesBaseTypes(serviceType, implementationConstructor);
internal static bool IsDecorator(Type serviceType, ConstructorInfo implementationConstructor) { // TODO: Find out if the call to DecoratesBaseTypes is needed (all tests pass without it). return(DecoratorHelpers.DecoratesServiceType(serviceType, implementationConstructor) && DecoratorHelpers.DecoratesBaseTypes(serviceType, implementationConstructor)); }