public override void LoadValue(SafeBinaryReader reader) { int length = reader.ReadInt32(); if (length == 0) { _fields[_fieldIndex] = string.Empty; } else { try { _fields[_fieldIndex] = reader.ReadStringSafeWithoutLength(length); } catch (EndOfStreamException) { throw new StringCorruptedException(); } } if (reader.ReadUInt32() != END_MARKER) { throw new NoEndMarkerException("String property has no end marker"); } }
public override void LoadValue(SafeBinaryReader reader) { _fields[_fieldIndex] = IntInternalizer.Intern(reader.ReadInt32()); }