diff options
author | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2006-03-08 10:03:33 +0300 |
---|---|---|
committer | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2006-03-08 10:03:33 +0300 |
commit | 51b41b41f5d01131dadeb36f3e9c16eb85ad7361 (patch) | |
tree | 09ecc7bca9195cb8b0443c69cc0dd09b553b75cb /mcs | |
parent | 03899f5f0e15c8c4a576986ee9692eb7296be232 (diff) |
2006-03-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* Stream.cs: Add 2.0 members to Stream.cs (CanTimeout,
ReadTimeout and WriteTimeout).
svn path=/trunk/mcs/; revision=57684
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System.IO/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/corlib/System.IO/Stream.cs | 26 |
2 files changed, 31 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog index 3c61f2ed7d5..3ccfdfa9339 100644 --- a/mcs/class/corlib/System.IO/ChangeLog +++ b/mcs/class/corlib/System.IO/ChangeLog @@ -1,3 +1,8 @@ +2006-03-07 Carlos Alberto Cortez <calberto.cortez@gmail.com> + + * Stream.cs: Add 2.0 members to Stream.cs (CanTimeout, + ReadTimeout and WriteTimeout). + 2006-02-27 Gert Driesen <drieseng@users.sourceforge.net> * File.cs: In 2.0 profile, File.Get****Time(Utc) should not throw diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs index 3a0cf26b411..6053f360601 100644 --- a/mcs/class/corlib/System.IO/Stream.cs +++ b/mcs/class/corlib/System.IO/Stream.cs @@ -63,6 +63,14 @@ namespace System.IO get; } +#if NET_2_0 + public virtual bool CanTimeout { + get { + return false; + } + } +#endif + public abstract long Length { get; @@ -94,6 +102,24 @@ namespace System.IO { Close (); } + + public virtual int ReadTimeout { + get { + throw new InvalidOperationException ("Timeouts are not supported on this stream."); + } + set { + throw new InvalidOperationException ("Timeouts are not supported on this stream."); + } + } + + public virtual int WriteTimeout { + get { + throw new InvalidOperationException ("Timeouts are not supported on this stream."); + } + set { + throw new InvalidOperationException ("Timeouts are not supported on this stream."); + } + } #endif protected virtual WaitHandle CreateWaitHandle() |