projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2008-08-21 Sebastien Pouliot <sebastien@ximian.com>
[mono.git]
/
mcs
/
class
/
corlib
/
System.IO
/
TextWriter.cs
diff --git
a/mcs/class/corlib/System.IO/TextWriter.cs
b/mcs/class/corlib/System.IO/TextWriter.cs
index 257ee04fdd5a8a127b5233f77fb5cbc46b0cd982..6f9f2a22f67d7ce84a513fa2ca33c354d0735b94 100644
(file)
--- a/
mcs/class/corlib/System.IO/TextWriter.cs
+++ b/
mcs/class/corlib/System.IO/TextWriter.cs
@@
-1,5
+1,5
@@
//
//
-// System.IO.TextWriter
+// System.IO.TextWriter
.cs
//
// Authors:
// Marcin Szczepanski (marcins@zipworld.com.au)
//
// Authors:
// Marcin Szczepanski (marcins@zipworld.com.au)
@@
-32,10
+32,21
@@
using System.Text;
using System.Text;
+#if NET_2_0
+using System.Runtime.InteropServices;
+#endif
+
namespace System.IO {
[Serializable]
namespace System.IO {
[Serializable]
+#if NET_2_0
+ [ComVisible (true)]
+#endif
+#if NET_2_1
+ public abstract class TextWriter : IDisposable {
+#else
public abstract class TextWriter : MarshalByRefObject, IDisposable {
public abstract class TextWriter : MarshalByRefObject, IDisposable {
+#endif
protected TextWriter() {
CoreNewLine = System.Environment.NewLine.ToCharArray ();
protected TextWriter() {
CoreNewLine = System.Environment.NewLine.ToCharArray ();
@@
-77,11
+88,20
@@
namespace System.IO {
Dispose (true);
}
Dispose (true);
}
- protected virtual void Dispose (bool disposing) { }
+ protected virtual void Dispose (bool disposing)
+ {
+ if (disposing){
+ // If we are explicitly disposed, we can avoid finalization.
+ GC.SuppressFinalize (this);
+ }
+ }
#if NET_2_0
public void Dispose ()
{
Dispose (true);
#if NET_2_0
public void Dispose ()
{
Dispose (true);
+
+ // If we are explicitly disposed, we can avoid finalization.
+ GC.SuppressFinalize (this);
}
#else
void System.IDisposable.Dispose () {
}
#else
void System.IDisposable.Dispose () {
@@
-121,11
+141,11
@@
namespace System.IO {
// Do nothing
}
// Do nothing
}
- public virtual void Write (char[]
value
)
+ public virtual void Write (char[]
buffer
)
{
{
- if (
value
== null)
+ if (
buffer
== null)
return;
return;
- Write (
value, 0, value
.Length);
+ Write (
buffer, 0, buffer
.Length);
}
public virtual void Write (decimal value)
}
public virtual void Write (decimal value)
@@
-229,9
+249,9
@@
namespace System.IO {
WriteLine();
}
WriteLine();
}
- public virtual void WriteLine (char[]
value
)
+ public virtual void WriteLine (char[]
buffer
)
{
{
- Write (
value
);
+ Write (
buffer
);
WriteLine();
}
WriteLine();
}
@@
-650,8
+670,3
@@
namespace System.IO {
}
}
}
}
}
}
-
-
-
-
-