-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
These versions should not throw, but rather return true/false.
bool TrySerialise(Stream, object) // if false, stream is left in unspecified state
bool TrySerialise(UnsafePacker, object) // if false, packer is left in unspecified state
bool TrySerialise(object, out byte[]) // if false, byte[] is null
bool TryDeserialise(Stream) // if false, stream is left in unspecified state
bool TryDeserialise(Unpacker) // if false, unpacker is left in unspecified state
bool TryDeserialise(byte[], out object) // if false, object is null
Duplicate the above for the generic Serialiser<T> and Deserialiser<T>.
Before implementing this, consider whether the Stream/Unpacker overloads actually make sense. Leaving the streams in an unspecified state is basically unrecoverable. Consider the scenarios here.
Metadata
Metadata
Assignees
Labels
No labels