private void ThrowWhenDecoratorNeedsAFunc() { bool needsADecorateeFactory = this.DecoratorNeedsADecorateeFactory(); if (needsADecorateeFactory) { string message = StringResources.CantGenerateFuncForDecorator(this.registeredServiceType, this.DecoratorTypeDefinition); throw new ActivationException(message); } }
private void ThrowWhenDecoratorNeedsAFunc() { Type decorateeFactoryType = this.GetDecorateeFactoryTypeOrNull(); if (decorateeFactoryType != null) { string message = StringResources.CantGenerateFuncForDecorator( this.registeredServiceType, decorateeFactoryType, this.DecoratorTypeDefinition ?? this.decoratorType); throw new ActivationException(message); } }