using System;
using System.Collections;
using System.IO;
using System.Text;
namespace BinLogReader
{
///
/// Aggregates plugin information
///
public class PluginDb
{
private ArrayList PluginList;
public int Count
{
get
{
return PluginList.Count;
}
}
public PluginDb(uint plugins)
{
PluginList = new ArrayList((int)plugins);
}
public Plugin GetPluginById(ushort id)
{
return GetPluginById((int)id);
}
public Plugin GetPluginById(int id)
{
if (id < 0 || id >= PluginList.Count)
return null;
return (Plugin)PluginList[id];
}
public static PluginDb FromFile(BinaryReader br)
{
//read plugins
uint plugins = br.ReadUInt32();
PluginDb db = new PluginDb(plugins);
for (uint i=0; i