public VocabularyService(IExtensibleVocabularyService extensibleVocabularyService,
                          IPluginsProvider pluginsProvider, IRepository <DbVocabularyValue> vocabularyValuesRepository,
                          IRepository <DbVocabularyUserValue> vocabularyUserValuesRepository)
 {
     _extensibleVocabularyService    = extensibleVocabularyService;
     _pluginsProvider                = pluginsProvider;
     _vocabularyValuesRepository     = vocabularyValuesRepository;
     _vocabularyUserValuesRepository = vocabularyUserValuesRepository;
 }
Ejemplo n.º 2
0
        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>();
        }
Ejemplo n.º 3
0
        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>();
        }
Ejemplo n.º 4
0
 private PluginsManager()
 {
     configuration        = new ConfigurationImpl();
     localPluginsProvider = new LocalPluginsProvider();
 }// END Constructor
Ejemplo n.º 5
0
        }// 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