internal WeaklyTypedServiceConfigurator(Type dependencyType, Type instanceType, BindingMetadata bindingMetadata)
 {
     ServiceTypeValidator.CheckIsEnumerable(dependencyType);
     ServiceTypeValidator.CheckIsAssignable(dependencyType, instanceType);
     _instanceType    = instanceType;
     _bindingMetadata = bindingMetadata;
     _dependencyTypes = new SinglyLinkedListNode <Type>(dependencyType);
 }
 internal StronglyTypedLateInjectorConfigurator(BindingMetadata bindingMetadata)
 {
     _bindingMetadata = bindingMetadata;
 }
 internal WeaklyTypedLateInjectorConfigurator(Type instanceType, BindingMetadata bindingMetadata)
 {
     _bindingMetadata = bindingMetadata;
     _instanceType    = instanceType;
 }
Exemplo n.º 4
0
 public ServiceBinding(Type dependencyType, BindingMetadata bindingMetadata, Expression expression,
                       Lifetime lifetime            = Lifetime.Transient, Action <object>?finalizer = null,
                       DisposeBehavior needsDispose = DisposeBehavior.Default) : this(new SinglyLinkedListNode <Type>(dependencyType), bindingMetadata, expression, lifetime, finalizer, needsDispose)
 {
 }
 internal WeaklyTypedDecoratorConfigurator(Type dependencyType, Type decoratorType, BindingMetadata bindingMetadata)
 {
     _bindingMetadata = bindingMetadata;
     _dependencyType  = dependencyType;
     _expression      = decoratorType.AutoResolveConstructorExpression();
     DecoratorTypeValidator.CheckIsInterface(dependencyType);
     DecoratorTypeValidator.CheckParameters(_expression, dependencyType, decoratorType);
 }