Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorDick Porter <dick@acm.org>2004-08-18 17:54:00 +0400
committerDick Porter <dick@acm.org>2004-08-18 17:54:00 +0400
commit4b6ee1cb367c6eb07fc2509f9dc9b0723c93e7ee (patch)
tree228b2f3fce9f7565449e3959628e3f5931b676e4 /mcs
parenteda1a34ec69bb8040ca2c9ff0f6b9422b933d5ba (diff)
2004-08-18 Dick Porter <dick@ximian.com>
* StreamWriter.cs: Flush the buffer if AutoFlush is set to true. Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com). svn path=/branches/mono-1-0/mcs/; revision=32487
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/corlib/System.IO/ChangeLog5
-rw-r--r--mcs/class/corlib/System.IO/StreamWriter.cs16
2 files changed, 15 insertions, 6 deletions
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog
index 19a9b7a3b59..75d3b48b95b 100644
--- a/mcs/class/corlib/System.IO/ChangeLog
+++ b/mcs/class/corlib/System.IO/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-18 Dick Porter <dick@ximian.com>
+
+ * StreamWriter.cs: Flush the buffer if AutoFlush is set to true.
+ Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com).
+
2004-08-13 Dick Porter <dick@ximian.com>
* StreamWriter.cs: Allow FileShare.Read access to the underlying
diff --git a/mcs/class/corlib/System.IO/StreamWriter.cs b/mcs/class/corlib/System.IO/StreamWriter.cs
index 117ab7f5d60..96ac1380984 100644
--- a/mcs/class/corlib/System.IO/StreamWriter.cs
+++ b/mcs/class/corlib/System.IO/StreamWriter.cs
@@ -137,12 +137,16 @@ namespace System.IO {
get {
return iflush;
}
- set {
- if (DisposedAlready)
- throw new ObjectDisposedException("StreamWriter");
- iflush = value;
- }
- }
+ set {
+ if (DisposedAlready)
+ throw new ObjectDisposedException("StreamWriter");
+ iflush = value;
+
+ if (iflush) {
+ Flush ();
+ }
+ }
+ }
public virtual Stream BaseStream {
get {