コード例 #1
0
 internal StronglyTypedDecoratorConfigurator(BindingMetadata bindingMetadata)
 {
     _bindingMetadata = bindingMetadata;
     _dependencyType  = typeof(TDependency);
     _expression      = AutoResolveConstructorExpressionCache <TDecorator> .Expression;
     DecoratorTypeValidator.CheckIsInterface(typeof(TDependency));
     DecoratorTypeValidator.CheckParameters(_expression, typeof(TDependency), typeof(TDecorator));
 }
コード例 #2
0
 internal WeaklyTypedDecoratorConfigurator(Type dependencyType, Type decoratorType, BindingMetadata bindingMetadata)
 {
     _bindingMetadata = bindingMetadata;
     _dependencyType  = dependencyType;
     _expression      = decoratorType.AutoResolveConstructorExpression();
     DecoratorTypeValidator.CheckIsInterface(dependencyType);
     DecoratorTypeValidator.CheckParameters(_expression, dependencyType, decoratorType);
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 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);
 }