protected static ITypeDefOrRef ReadTypeDefOrRef(MetadataHeader header, IBinaryStreamReader reader)
{
var tableStream = header.GetStream<TableStream>();
uint codedIndex;
if (!reader.TryReadCompressedUInt32(out codedIndex))
return null;
MetadataMember type;
tableStream.TryResolveMember(tableStream.GetIndexEncoder(CodedIndex.TypeDefOrRef)
.DecodeIndex(codedIndex), out type);
return type as ITypeDefOrRef;
}