public static byte[] Write(this SessionStateValue stateValue, bool compressed) { return(compressed ? GenericSerializationUtil.BinaryWriterOperationToByteBufferWithCompression(stateValue, SerializeSessionState) : GenericSerializationUtil.BinaryWriterOperationToByteBuffer(stateValue, SerializeSessionState)); }
public static SessionStateValue ReadSessionState(this byte[] source, bool compressed) { return(compressed ? GenericSerializationUtil.ByteBufferToReaderOperationWithCompression(source, DeserializeSessionState) : GenericSerializationUtil.ByteBufferToReaderOperation(source, DeserializeSessionState)); }