public object LoadObject()
{
var typeId = _reader.ReadVUInt32();
if (typeId == 0)
{
return null;
}
if (typeId == 1)
{
var backRefId = _reader.ReadVUInt32();
return _visited[(int)backRefId];
}
if (typeId >= _id2Info.Count)
throw new BtdbMissingMetadataException();
var infoForType = _id2Info[(int)typeId];
if (infoForType.Loader == null)
{
infoForType.Loader = LoaderFactory(infoForType.Descriptor);
}
return infoForType.Loader(_reader, this, infoForType.Descriptor);
}