示例#1
0
 public SingletonLazyCreator(
     DiContainer container, SingletonProviderMap owner, Type instanceType)
 {
     _container    = container;
     _owner        = owner;
     _instanceType = instanceType;
 }
示例#2
0
 public CustomScopeReferenceBinder(
     BindScope owner,
     DiContainer container, SingletonProviderMap singletonMap)
     : base(container, singletonMap)
 {
     _owner = owner;
 }
示例#3
0
 public GenericBinder(
     DiContainer container, Type contractType, SingletonProviderMap singletonMap)
     : base(container, contractType)
 {
     Assert.That(contractType.IsOpenGenericType(), "Expected open generic type in GenericBinder");
     _singletonMap = singletonMap;
 }
示例#4
0
 public CustomScopeUntypedBinder(
     BindScope owner, Type contractType,
     DiContainer container, SingletonProviderMap singletonMap)
     : base(container, contractType, singletonMap)
 {
     _owner = owner;
 }
示例#5
0
        public DiContainer()
        {
            _singletonMap = new SingletonProviderMap(this);
            _instantiator = new Instantiator(this);

            Bind <DiContainer>().To(this);
            Bind <Instantiator>().To(_instantiator);
        }
 public SingletonLazyCreator(
     DiContainer container, SingletonProviderMap owner,
     Type instanceType, Func <DiContainer, object> createMethod = null)
 {
     _container    = container;
     _owner        = owner;
     _instanceType = instanceType;
     _createMethod = createMethod;
 }
示例#7
0
        public DiContainer()
        {
            _singletonMap = new SingletonProviderMap(this);

            Bind <DiContainer>().To(this);

            // Pass an instance of Instantiator otherwise it will
            // try to call itself to create itself
            Bind <Instantiator>().To(new Instantiator(this));
        }
示例#8
0
 public ReferenceBinder(DiContainer container, SingletonProviderMap singletonMap)
     : base(container)
 {
     _singletonMap = singletonMap;
 }
示例#9
0
 internal BindScope(DiContainer container, SingletonProviderMap singletonMap)
 {
     _container    = container;
     _singletonMap = singletonMap;
 }
示例#10
0
 public BinderUntyped(
     DiContainer container, Type contractType, SingletonProviderMap singletonMap)
     : base(container, contractType)
 {
     _singletonMap = singletonMap;
 }