Exemple #1
0
        private AggregateCatalog CreatePluginCatalog(WebApi2HubOptions pluginLoaderConfiguration)
        {
            var pluginsCatalog = new AggregateCatalog();
            var dirs           = GetPluginDirectories(pluginLoaderConfiguration.PluginRootPath);

            foreach (var pluginDirectory in dirs)
            {
                pluginsCatalog.Catalogs.Add(new DirectoryCatalog(pluginDirectory));
            }

            return(pluginsCatalog);
        }
Exemple #2
0
        public PluginLoadingManager(WebApi2HubOptions pluginLoaderConfiguration)
        {
            var catalogue = CreatePluginCatalog(pluginLoaderConfiguration);

            CreateCompositionContainer(catalogue);
        }