Exemplo n.º 1
0
        public void LoadAllAddins(string addin_FolderPath, bool searchChildFolder)
        {
            ReflectionHelper.TypeLoadConfig config = new ReflectionHelper.TypeLoadConfig(this.copyToMem, false, AddinHelper.AddinSign);
            IList<Type> addinTypeList = ReflectionHelper.LoadDerivedType(typeof(IAddin), addin_FolderPath, searchChildFolder, config);
            foreach (Type addinType in addinTypeList)
            {
                IAddin addin = (IAddin)Activator.CreateInstance(addinType);
                this.dicAddins.Add(addin.AddinKey, addin);
                addin.OnLoading();
            }

            this.AddinsChanged();
        } 
Exemplo n.º 2
0
        public void LoadAllAddins(string addin_FolderPath, bool searchChildFolder)
        {
            ReflectionHelper.TypeLoadConfig config = new ReflectionHelper.TypeLoadConfig(this.copyToMem, false, "Addin.dll");
            IList <Type> list = ReflectionHelper.LoadDerivedType(typeof(IAddin), addin_FolderPath, searchChildFolder, config);

            foreach (Type type in list)
            {
                IAddin addin = (IAddin)Activator.CreateInstance(type);
                this.dicAddins.Add(addin.AddinKey, addin);
                addin.OnLoading();
            }
            this.AddinsChanged();
        }