internal static string[] GetFeatureNames(PEReader buff, MDTable tabIx, MDTable mapTabIx,
ClassDef theClass, uint classIx)
{
buff.SetElementPosition(mapTabIx,0);
uint start = 0, end = 0, i = 0;
for (; (i < buff.GetTableSize(tabIx)) && (start == 0); i++) {
if (buff.GetIndex(MDTable.TypeDef) == classIx) {
start = buff.GetIndex(tabIx);
}
}
if (start == 0) return null;
if (i < buff.GetTableSize(mapTabIx)) {
uint junk = buff.GetIndex(MDTable.TypeDef);
end = buff.GetIndex(tabIx);
} else
end = buff.GetTableSize(tabIx);
if (tabIx == MDTable.Event)
theClass.eventIx = start;
else
theClass.propIx = start;
string[] names = new string[end-start];
buff.SetElementPosition(tabIx,start);
for (i=start; i < end; i++) {
uint junk = buff.ReadUInt16();
names[i] = buff.GetString();
if (tabIx == MDTable.Event)
junk = buff.GetCodedIndex(CIx.TypeDefOrRef);
else
junk = buff.GetBlobIx();
}
return names;
}