private void Init() { if (PluginLocator == null) { throw new Exception("PlugEngine needs a ILocator to work"); } Constructor = new CompactConstructor(PluginLocator.ObjectDefinitions, "default"); PlugsRegistry = new CompactPlugsRegistry(Constructor); PluginLocator.SearchPlugins(); PlugsRegistry.Add(PluginLocator.Plugins); }
Dictionary <string, List <Plugin> > CategoryDic; //key Category public CompactPlugsRegistry(CompactConstructor constructor) { LoadedPlugins = new Dictionary <string, KeyValuePair <Plugin, object> >(); LoadedPluginsByType = new Dictionary <Type, KeyValuePair <Plugin, object> >(); InstalledPlugins = new Dictionary <string, Plugin>(); //TODO: falta guardar el estado y loader el estado de los plugin instalados en un archivo InitialPlugins = new Dictionary <string, Plugin>(); Outputs = new Dictionary <Type, List <KeyValuePair <string, object> > >(); Inputs = new Dictionary <Type, List <Plugin> >(); AllPlugins = new Dictionary <string, Plugin>(); PosibleCallers = new Dictionary <string, List <string> >(); CategoryDic = new Dictionary <string, List <Plugin> >(); _Constructor = constructor; }