public AbpPlugInManager()
        {
            PlugInSources = new PlugInSourceList();

            //TODO: Try to use AssemblyLoadContext.Default..?
            RegisterToAssemblyResolve(PlugInSources);
        }
Exemple #2
0
        private static void RegisterToAssemblyResolve(PlugInSourceList plugInSources)
        {
            if (_isRegisteredToAssemblyResolve)
            {
                return;
            }

            lock (SyncObj)
            {
                if (_isRegisteredToAssemblyResolve)
                {
                    return;
                }

                _isRegisteredToAssemblyResolve = true;

                AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
                {
                    return(plugInSources.GetAllAssemblies().FirstOrDefault(a => a.FullName == args.Name));
                };
            }
        }
Exemple #3
0
        public AbpPlugInManager()
        {
            PlugInSources = new PlugInSourceList();

            RegisterToAssemblyResolve(PlugInSources);
        }
Exemple #4
0
 public AbpPlugInManager()
 {
     PlugInSources = new PlugInSourceList();
 }
Exemple #5
0
 public static void AddFolder(this PlugInSourceList list, string folder, SearchOption searchOption = SearchOption.TopDirectoryOnly)
 {
     list.Add(new FolderPlugInSource(folder, searchOption));
 }
Exemple #6
0
 public static void AddTypeList(this PlugInSourceList list, params Type[] moduleTypes)
 {
     list.Add(new PlugInTypeListSource(moduleTypes));
 }