Esempio n. 1
0
        public StaticPluginCacheAccessorBootstrapper(IPluginCache<T> cache)
        {
            if (this.isBootstrapped)
                throw new NotSupportedException($"IPluginCache<{typeof(T).Name}> was already bootstrapped");

            this.SetCurrentCache(cache);
            this.isBootstrapped = true;
        }
Esempio n. 2
0
 public PluginHandle(PluginSetInfo plugins,
                     IPluginCache pluginCache, IEnumerable <IPluginFilter> pluginFilters)
 {
     Plugins        = plugins;
     PluginCache    = pluginCache;
     PluginFilters  = pluginFilters;
     _lazyInstances = new Lazy <TPlugin[]>(
         () => GetInstances(_ => true).Cast <TPlugin>().ToArray());
 }
Esempio n. 3
0
 public DefaultMvcPluginLoader(IAssemblyScanner assemblyScanner,
                               IPluginTypeSelector pluginTypeSelector,
                               IAssemblyLoader assemblyLoader,
                               IPluginCache pluginCache)
 {
     this.assemblyScanner    = assemblyScanner;
     this.pluginTypeSelector = pluginTypeSelector;
     this.assemblyLoader     = assemblyLoader;
     this.pluginCache        = pluginCache;
 }
Esempio n. 4
0
        public DefaultStaticPluginCacheAccessorBootstrapper(IPluginCache cache)
        {
            if (this.isBootstrapped)
            {
                throw new NotSupportedException($"IPluginCache was already bootstrapped");
            }

            this.SetCurrentCache(cache);
            this.isBootstrapped = true;
        }
Esempio n. 5
0
 public HomeController(
     ApplicationPartManager applicationPartManager,
     ILogger <HomeController> logger,
     IAssemblyScanner <IMVCFeature> assemblyScanner,
     IPluginAssemblyLoader <IMVCFeature> pluginAssemblyLoader,
     IPriseActionDescriptorChangeProvider pluginChangeProvider,
     IPluginCache <IMVCFeature> pluginCache
     )
 {
     this.applicationPartManager = applicationPartManager;
     this.logger               = logger;
     this.assemblyScanner      = assemblyScanner;
     this.pluginAssemblyLoader = pluginAssemblyLoader;
     this.pluginChangeProvider = pluginChangeProvider;
     this.pluginCache          = pluginCache;
 }
Esempio n. 6
0
 public void SetCurrentCache(IPluginCache<T> cache)
 {
     StaticPluginCacheAccessor<T>.CurrentCache = cache;
 }
 public DefaultMvcRazorPluginLoader(IAssemblyScanner assemblyScanner,
                                    IPluginTypeSelector pluginTypeSelector,
                                    IAssemblyLoader assemblyLoader,
                                    IPluginCache pluginCache) : base(assemblyScanner, pluginTypeSelector, assemblyLoader, pluginCache)
 {
 }
Esempio n. 8
0
 public void SetCurrentCache(IPluginCache cache)
 {
     DefaultStaticPluginCacheAccessor.CurrentCache = cache;
 }