public Record[] GetRecordList(IEnumerable types)
{
if (types == null)
return EnumerateRecords(null).Select(x => x.Value).ToArray();
var vtypes = new HashSet<string>(types.OfType<string>());
Predicate<BaseRecord> itr = (rec) => (rec is Plugin)
|| (rec is GroupRecord && (((GroupRecord)rec).groupType != 0 || vtypes.Contains(((GroupRecord)rec).ContentsType)))
|| (rec is Record && vtypes.Contains(rec.Name));
return Enumerate(itr).OfType<Record>().ToArray();
}