Пример #1
0
        private static void DecoratesServiceType(Type serviceType, ConstructorInfo decoratorConstructor,
                                                 string paramName)
        {
            bool decoratesServiceType = DecoratorHelpers.DecoratesServiceType(serviceType, decoratorConstructor);

            if (!decoratesServiceType)
            {
                ThrowMustDecorateServiceType(serviceType, decoratorConstructor, paramName);
            }
        }
Пример #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);
Пример #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));
 }