public VocabularyService(IExtensibleVocabularyService extensibleVocabularyService, IPluginsProvider pluginsProvider, IRepository <DbVocabularyValue> vocabularyValuesRepository, IRepository <DbVocabularyUserValue> vocabularyUserValuesRepository) { _extensibleVocabularyService = extensibleVocabularyService; _pluginsProvider = pluginsProvider; _vocabularyValuesRepository = vocabularyValuesRepository; _vocabularyUserValuesRepository = vocabularyUserValuesRepository; }
public PluginManager(IConfiguration configuration, IHost host , IPluginsProvider pluginProvider) { if (configuration == null) throw new ArgumentNullException("Configuration can not be null"); if (host == null) throw new ArgumentNullException("host"); if (pluginProvider == null) throw new ArgumentNullException("pluginProvider"); this._configuration = configuration; this._host = host; this._plugins = new List<Plugin>(); }
public PluginManager(IConfiguration configuration, IHost host , IPluginsProvider pluginProvider) { if (configuration == null) { throw new ArgumentNullException("Configuration can not be null"); } if (host == null) { throw new ArgumentNullException("host"); } if (pluginProvider == null) { throw new ArgumentNullException("pluginProvider"); } this._configuration = configuration; this._host = host; this._plugins = new List <Plugin>(); }
private PluginsManager() { configuration = new ConfigurationImpl(); localPluginsProvider = new LocalPluginsProvider(); }// END Constructor
}// END Method GetRegisteredPlugins public IEnumerable <PluginInterfaceType> GetRegisteredPlugins <PluginInterfaceType>(IPluginsProvider pluginsProvider) { List <PluginInterfaceType> rslt = new List <PluginInterfaceType>(); lock (this) { List <string> pluginImplementationAddresses = new List <string>(); if (Configuration.PersistenceDriver.ExistPluginInterface(typeof(PluginInterfaceType).AssemblyQualifiedName)) { foreach (String pluginImplementationAddress in Configuration.PersistenceDriver.GetPluginImplementationsAddresses(typeof(PluginInterfaceType).AssemblyQualifiedName)) { pluginImplementationAddresses.Add(pluginImplementationAddress); } } foreach (string pluginImplementationAddress in pluginImplementationAddresses) { if (pluginImplementationAddress.StartsWith(pluginsProvider.Scheme + ":")) { rslt.Add(pluginsProvider.GetPlugin <PluginInterfaceType>(pluginImplementationAddress)); } } } return(rslt); }// END Method GetRegisteredPlugins