public LogEventPublisherDetails LoadEventPublisherDetails(Stream stream)
{
byte version = stream.ReadNextByte();
switch (version)
{
case 0:
return new LogEventPublisherDetails(stream, this);
case 1:
{
if (m_isSimple)
throw new Exception("Cannot load without a LogMessageSaveHelper");
int id = stream.ReadInt32();
return m_ownerLoadLookup[id];
}
case 2:
{
if (m_isSimple)
throw new Exception("Cannot load without a LogMessageSaveHelper");
int id = stream.ReadInt32();
var details = new LogEventPublisherDetails(stream, this);
m_ownerLoadLookup.Add(details);
return details;
}
case 3:
{
if (m_isSimple)
throw new Exception("Cannot load without a LogMessageSaveHelper");
var details = new LogEventPublisherDetails(stream, this);
m_ownerLoadLookup.Add(details);
return details;
}
default:
throw new VersionNotFoundException();
}
}