[Mono-list] [PATCH] BufferedStream.cs
Gonzalo Paniagua Javier
gonzalo@ximian.com
20 Nov 2002 12:21:29 +0100
El mié, 20-11-2002 a las 12:12, Carlos Guzmán Álvarez escribió:
>
> public override void Flush() {
> if (m_buffer_reading) {
> - m_stream.Position = Position;
> + if((m_stream.GetType().FullName != "System.Net.Sockets.NetworkStream")){
> + m_stream.Position = Position;
> + }
m_stream.GetType () != typeof (System.Net.Sockets.NetworkStream) should
work, but that only fixes this for NetworkStream. It's better to use the
CanSeek property of the underlying stream to know if we can set the
Position.
-Gonzalo