public DefaultContainer()
 {
     _extensions = new List<IContainerExtension>();
     _componetnts = new ComponentRegistry();
     _exports = new ExportRegistry();
     _exportproviders = new ExportProviderRegistry();
     _exportproviders.ExportsChanged += ExportsChanged;
     Register(new DefaultExtension());
     _buildEngine = new BuildEngine(this, _exportproviders, _componetnts);
 }
        /// <summary>
        ///     Initializes a new instance of the <see cref="BuildEngine" /> class.
        ///     Initialisiert eine neue Instanz der <see cref="BuildEngine" /> Klasse.
        ///     Initializes a new instance of the <see cref="BuildEngine" /> class.
        /// </summary>
        /// <param name="container">
        ///     The container.
        /// </param>
        /// <param name="providerRegistry">
        ///     The provider registry.
        /// </param>
        /// <param name="componentRegistry">
        ///     The component registry.
        /// </param>
        public BuildEngine(
            IContainer container,
            ExportProviderRegistry providerRegistry,
            ComponentRegistry componentRegistry)
        {
            Contract.Requires<ArgumentNullException>(container != null, "container");
            Contract.Requires<ArgumentNullException>(providerRegistry != null, "providerRegistry");
            Contract.Requires<ArgumentNullException>(componentRegistry != null, "componentRegistry");

            this.container = container;
            _componentRegistry = componentRegistry;
            _factory =
                componentRegistry.GetAll<IExportFactory>()
                                 .First(fac => fac.TechnologyName == AopConstants.DefaultExportFactoryName)
                                 .CastObj<DefaultExportFactory>();
            pipeline = new Pipeline(componentRegistry);
            rebuildManager = new RebuildManager();
            providerRegistry.ExportsChanged += ExportsChanged;
        }