Esempio n. 1
0
        public InternalFactoryBuilder Register(RuntimeTypeHandle typeHandle, string keyName, Type registerType)
        {
            InternalFactory newInternalFactory = new InternalFactory();

            newInternalFactory.Activator = new ReflectionActivator(registerType);

            this.InternalFactorys.Add(new Identity(typeHandle, keyName), newInternalFactory);

            return(new InternalFactoryBuilder(newInternalFactory));
        }
Esempio n. 2
0
        public InternalFactoryBuilder Register(Type type, object instance)
        {
            InternalFactory newInternalFactory = new InternalFactory();

            newInternalFactory.Activator = new InstanceActivator(instance);
            newInternalFactory.Lifecycle = new SingletonLifecycle();

            this.InternalFactorys.Add(new Identity(type.TypeHandle, type.FullName), newInternalFactory);

            return(new InternalFactoryBuilder(newInternalFactory));
        }
Esempio n. 3
0
 public ParameterInjector(IContainer container, InternalFactory internalFactory)
 {
     this.Container       = container;
     this.InternalFactory = internalFactory;
 }
Esempio n. 4
0
        public InternalFactoryBuilder Register(Type registerType, InternalFactory newInternalFactory)
        {
            this.InternalFactorys.Add(new Identity(registerType.TypeHandle, registerType.FullName), newInternalFactory);

            return(new InternalFactoryBuilder(newInternalFactory));
        }
Esempio n. 5
0
 public InternalFactoryBuilder(InternalFactory internalFactory)
 {
     this.InternalFactory = internalFactory;
 }