ContentStream issue in reading & parsing attachments

Hi,

We are trying to get attachments (uploaded through on sync gateway api) in mobile (xamarin) side. The new blob structure causes some problem during the serialization process. In details:

The Blob class in Couchbase.Lite has a Stream property called ContentStream whose get returns a BlobReadStream object that implements. NET’s Stream class but when I try to get the ReadTimeout or WriteTimeout properties of this object, an InvalidOperationException is thrown since these properties are not overridden in the BlobReadStream class and the blobread. This causes some problems when I try to serialize this object to a JSON string so I was wondering if there was a workaround for this.
https://msdn.microsoft.com/en-us/library/system.io.stream.readtimeout
Under notes in the above link, it says the property should be overridden.

Sync gw version: Couchbase Sync Gateway/2.0.0(773;5a497fd)
CB Lite: Developer build 22 within 2.0

Thanks a lot.

It also says if the stream does not support timeout to throw an InvalidOperationException. I didn’t do this on purposes, I simply didn’t think to override it but what problems are you running into? There are other stream classes that throw exceptions for this property as well in the .NET world so there must be some way to deal with it (maybe a custom serializer, etc ?)