Esempio n. 1
0
        public MainPanelPluginManager(SysConfigMgrAccess sysConfig)
            : base(sysConfig)
        {
            List <string> keywords = new List <string>();

            keywords.Add("L3MainPanel");
            keywords.Add(".dll");

            String path = AppDomain.CurrentDomain.BaseDirectory + "MainPanel\\";

            PluginSearchCriteria filterSearchCriteria = new PluginSearchCriteria(path, keywords);

            base.FindPlugins(filterSearchCriteria);
        }
Esempio n. 2
0
        public FilterPluginManager()
            : base()
        {
            List <string> keywords = new List <string>();

            keywords.Add("L3Filter");
            keywords.Add(".dll");

            String path = AppDomain.CurrentDomain.BaseDirectory + "Filters\\";

            PluginSearchCriteria filterSearchCriteria = new PluginSearchCriteria(path, keywords);

            base.FindPlugins(filterSearchCriteria);
        }
Esempio n. 3
0
        protected void FindPlugins(PluginSearchCriteria pluginSearchCriteria)
        {
            foreach (string fileName in Directory.GetFiles(pluginSearchCriteria.Path))
            {
                Boolean IsFileFound = true;

                foreach (string keyword in pluginSearchCriteria.Keywords)
                {
                    if (!fileName.Contains(keyword))
                    {
                        IsFileFound = false;
                        break;
                    }
                }

                if (IsFileFound)
                {
                    m_PluginAssemblies.Add(fileName);
                }
            }
        }