Example #1
0
        List<Info> GetInfos()
        {
            var infos = new List<Info>();

            infos.Add(new Info(GetType().Assembly, CreateDnSpyInfo()));

            var toPlugin = new Dictionary<Assembly, IPlugin>();
            foreach (var plugin in pluginManager.Plugins)
                toPlugin[plugin.GetType().Assembly] = plugin;

            // The plugins in LoadedPlugins were added in random order, and will also be shown in
            // the same random order.
            foreach (var x in pluginManager.LoadedPlugins) {
                PluginInfo pluginInfo;
                IPlugin plugin;
                if (toPlugin.TryGetValue(x.Assembly, out plugin))
                    pluginInfo = plugin.PluginInfo;
                else
                    pluginInfo = new PluginInfo();

                infos.Add(new Info(x.Assembly, pluginInfo));
            }

            return infos;
        }
Example #2
0
 public Info(Assembly asm, PluginInfo info)
 {
     this.Assembly = asm;
     this.PluginInfo = info;
 }
Example #3
0
		List<Info> GetInfos() {
			var infos = new List<Info>();

			infos.Add(new Info(GetType().Assembly, CreateDnSpyInfo()));

			var toPlugin = new Dictionary<Assembly, IPlugin>();
			foreach (var plugin in pluginManager.Plugins)
				toPlugin[plugin.GetType().Assembly] = plugin;

			// Show the plugins in random order
			var random = new Random();
			foreach (var x in pluginManager.LoadedPlugins.OrderBy(a => random.Next())) {
				PluginInfo pluginInfo;
				IPlugin plugin;
				if (toPlugin.TryGetValue(x.Assembly, out plugin))
					pluginInfo = plugin.PluginInfo;
				else
					pluginInfo = new PluginInfo();

				infos.Add(new Info(x.Assembly, pluginInfo));
			}

			return infos;
		}