Пример #1
0
        public Component[] LoadComponents(string dirPath)
        {
            // set search method of this (host for components being loaded)
            SearchMethod = new ComponentSearchDirectory(dirPath);

            List <Component> components = new List <Component>();
            DirectoryInfo    dirInfo    = new DirectoryInfo(dirPath);

            foreach (FileInfo fileInfo in dirInfo.GetFiles())
            {
                Component component = LoadComponent(fileInfo.FullName);
                if (null != component)
                {
                    components.Add(component);
                }
            }
            return(components.ToArray());
        }
Пример #2
0
        public Component[] LoadComponents(string dirPath)
        {
            // set search method of this (host for components being loaded)
            SearchMethod = new ComponentSearchDirectory(dirPath);

            List<Component> components = new List<Component>();
            DirectoryInfo dirInfo = new DirectoryInfo(dirPath);
            foreach (FileInfo fileInfo in dirInfo.GetFiles())
            {
                Component component = LoadComponent(fileInfo.FullName);
                if (null != component)
                    components.Add(component);
            }
            return components.ToArray();
        }