Exemplo n.º 1
0
        public SimpleIocContainer(Func <IocContainer, IocActivator> activatorFactory,
                                  Func <IocContainer, IocScanner> scannerFactory)
        {
            Validate.That(activatorFactory).IsNotNull();
            Validate.That(scannerFactory).IsNotNull();

            this.activatorFactory = activatorFactory;
            this.scannerFactory   = scannerFactory;
            this.scanner          = scannerFactory(this);
            this.activator        = activatorFactory(this);
            this.map = new Dictionary <string, Func <IocActivator, object> >(StringComparer.InvariantCultureIgnoreCase);
        }
        public SimpleIocContainer(Func<IocContainer, IocActivator> activatorFactory,
                                  Func<IocContainer, IocScanner> scannerFactory)
        {
            Validate.That(activatorFactory).IsNotNull();
            Validate.That(scannerFactory).IsNotNull();

            this.activatorFactory = activatorFactory;
            this.scannerFactory = scannerFactory;
            this.scanner = scannerFactory(this);
            this.activator = activatorFactory(this);
            this.map = new Dictionary<string, Func<IocActivator, object>>(StringComparer.InvariantCultureIgnoreCase);
        }
Exemplo n.º 3
0
        public SimpleIocContainer(Func <IocContainer, IocActivator> activatorFactory,
                                  Func <IocContainer, IocScanner> scannerFactory, IDictionary <string, Func <IocActivator, object> > map)
        {
            Validate.That(activatorFactory).IsNotNull();
            Validate.That(scannerFactory).IsNotNull();
            Validate.That(map).IsNotNull();

            this.activatorFactory = activatorFactory;
            this.scannerFactory   = scannerFactory;
            this.scanner          = scannerFactory(this);
            this.activator        = activatorFactory(this);
            this.map = map;
        }
        public SimpleIocContainer(Func<IocContainer, IocActivator> activatorFactory,
                                  Func<IocContainer, IocScanner> scannerFactory, IDictionary<string, Func<IocActivator, object>> map)
        {
            Validate.That(activatorFactory).IsNotNull();
            Validate.That(scannerFactory).IsNotNull();
            Validate.That(map).IsNotNull();

            this.activatorFactory = activatorFactory;
            this.scannerFactory = scannerFactory;
            this.scanner = scannerFactory(this);
            this.activator = activatorFactory(this);
            this.map = map;
        }