예제 #1
0
        /// <summary>
        /// Builds a collection of modules.
        /// </summary>
        /// <param name="providers">An array of strings, containing the name (without namespace) of the types to request.</param>
        /// <returns>A ModuleCollection that contains the requested modules.</returns>
        ModuleCollection BuildCollection(params string[] providers)
        {
            ModuleCollection collection = new ModuleCollection();

            collection.AddProviders(providers.Select(typeName => moduleCollection.GetProvider(typeName)));
            return(collection);
        }
예제 #2
0
        internal ModuleFactory()
        {
            moduleCollection = new ModuleCollection();
            requesters       = new List <IModuleRequester>();

            constructors = new List <IModuleConstructor>();

            modules = new List <Object>();
            moduleCollection.AddProviders(GetDefaultProviders());

            disposables = new List <IDisposable>();
            loadables   = new List <ILoadable>();
        }