internal StronglyTypedDecoratorConfigurator(BindingMetadata bindingMetadata) { _bindingMetadata = bindingMetadata; _dependencyType = typeof(TDependency); _expression = AutoResolveConstructorExpressionCache <TDecorator> .Expression; DecoratorTypeValidator.CheckIsInterface(typeof(TDependency)); DecoratorTypeValidator.CheckParameters(_expression, typeof(TDependency), typeof(TDecorator)); }
internal WeaklyTypedDecoratorConfigurator(Type dependencyType, Type decoratorType, BindingMetadata bindingMetadata) { _bindingMetadata = bindingMetadata; _dependencyType = dependencyType; _expression = decoratorType.AutoResolveConstructorExpression(); DecoratorTypeValidator.CheckIsInterface(dependencyType); DecoratorTypeValidator.CheckParameters(_expression, dependencyType, decoratorType); }
internal StronglyTypedDecoratorConfigurator(string callerFilePath, int callerLineNumber, IModule?module = null) { _module = module; _callerFilePath = callerFilePath; _callerLineNumber = callerLineNumber; _dependencyType = typeof(TDependency); _expression = AutoResolveConstructorExpressionCache <TDecorator> .Expression; DecoratorTypeValidator.CheckIsInterface(typeof(TDependency)); DecoratorTypeValidator.CheckParameters(_expression, typeof(TDependency), typeof(TDecorator)); }
internal WeaklyTypedDecoratorConfigurator(Type dependencyType, Type decoratorType, string callerFilePath, int callerLineNumber, IModule?module = null) { _module = module; _callerFilePath = callerFilePath; _callerLineNumber = callerLineNumber; _dependencyType = dependencyType; _expression = decoratorType.AutoResolveConstructorExpression(); DecoratorTypeValidator.CheckIsInterface(dependencyType); DecoratorTypeValidator.CheckParameters(_expression, dependencyType, decoratorType); }