Ejemplo n.º 1
0
        public INoobotContainer Generate()
        {
            var registry = new Registry();

            registry.Scan(x =>
            {
                x.TheCallingAssembly();
                x.WithDefaultConventions();
            });

            registry = _pipelineManager.Initialise(registry);
            registry = _pluginManager.Initialise(registry);

            foreach (Type type in _singletons)
            {
                registry.For(type).Singleton();
            }

            Type[] pluginTypes = _pluginManager.ListPluginTypes();
            var    container   = new NoobotContainer(registry, pluginTypes);

            IPipelineFactory pipelineFactory = container.GetInstance <IPipelineFactory>();

            pipelineFactory.SetContainer(container);

            return(container);
        }