Example #1
0
        private static void DecoratesBaseTypes(Type serviceType, ConstructorInfo decoratorConstructor,
                                               string paramName)
        {
            bool decoratesBaseTypes =
                DecoratorHelpers.DecoratesBaseTypes(serviceType, decoratorConstructor);

            if (!decoratesBaseTypes)
            {
                ThrowMustDecorateBaseType(serviceType, decoratorConstructor, paramName);
            }
        }
Example #2
0
 // 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);
Example #3
0
 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));
 }