public LaunchablesDictionary LoadLaunchables() { LogManager.WriteLog("Loading all launchables"); var dictionary = new LaunchablesDictionary(); foreach (var plugin in launchablePlugins) { LogManager.WriteLog("Loading launchables from " + plugin); dictionary.SetValue(plugin.GetType(), plugin.Launchables()); plugin.Changed += FileChanged; } LogManager.WriteLog("Done loading all launchables"); return dictionary; }
internal void LoadFiles(LaunchablePlugins launchablePlugins) { var foldersToParse = new FoldersToParse(LoadFoldersToParse(), launchablePlugins); dictionary = foldersToParse.LoadLaunchables(); allLaunchables = dictionary.Launchables; foldersToParse.LaunchablesChanged += ((plugin, launchables) => new Runner(delegate { LogManager.WriteLog("Refresh caused by " + plugin); dictionary.SetValue(plugin.GetType(), launchables); allLaunchables = dictionary.Launchables; }).AsyncStart()); }