Author: gert
Date: 2006-05-30 05:02:37 -0400 (Tue, 30 May 2006)
New Revision: 61250
Modified:
trunk/mcs/class/corlib/System.Text/ASCIIEncoding.cs
trunk/mcs/class/corlib/System.Text/ChangeLog
trunk/mcs/class/corlib/System.Text/Decoder.cs
trunk/mcs/class/corlib/System.Text/Encoder.cs
trunk/mcs/class/corlib/System.Text/Encoding.cs
trunk/mcs/class/corlib/System.Text/NormalizationForm.cs
trunk/mcs/class/corlib/System.Text/StringBuilder.cs
trunk/mcs/class/corlib/System.Text/UTF7Encoding.cs
trunk/mcs/class/corlib/System.Text/UTF8Encoding.cs
trunk/mcs/class/corlib/System.Text/UnicodeEncoding.cs
Log:
* ASCIIEncoding.cs: Marked class ComVisible (true) on 2.0 profile.
Marked 2.0-only members as ComVisible (false).
* Decoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* Encoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* Encoding.cs: Marked class ComVisible (true) on 2.0 profile. Marked
2.0-only members as ComVisible (false).
* NormalizationForm.cs: Marked ComVisible (true).
* StringBuilder.cs: Marked class ComVisible (true) on 2.0 profile.
Marked 2.0-only methods as ComVisible (false).
* UnicodeEncoding.cs: GetString (byte[], int, int) is only available
in 2.0 profile. Marked 2.0-only methods ComVisible (false). Added
missing ctor in 2.0 profile, and marked in MonoTODO.
* UTF7Encoding.cs: Marked class ComVisible (true) on 2.0 profile.
* UTF8Encoding.cs: Marked 2.0-only methods as ComVisible (false).
Modified: trunk/mcs/class/corlib/System.Text/ASCIIEncoding.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/ASCIIEncoding.cs 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/ASCIIEncoding.cs 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -28,8 +28,12 @@
{
using System;
+using System.Runtime.InteropServices;
[Serializable]
+#if NET_2_0
+[ComVisible (true)]
+#endif
[MonoTODO ("Fix serialization compatibility with MS.NET")]
public class ASCIIEncoding : Encoding
{
@@ -45,6 +49,7 @@
}
#if NET_2_0
+ [ComVisible (false)]
public override bool IsSingleByte {
get { return true; }
}
@@ -313,6 +318,7 @@
#if NET_2_0
[CLSCompliantAttribute (false)]
+ [ComVisible (false)]
public unsafe override int GetBytes (char *chars, int charCount, byte
*bytes, int byteCount)
{
if (chars == null)
@@ -335,6 +341,7 @@
}
[CLSCompliantAttribute(false)]
+ [ComVisible (false)]
public unsafe override int GetChars (byte *bytes, int byteCount, char
*chars, int charCount)
{
if (bytes == null)
@@ -357,12 +364,14 @@
}
[CLSCompliantAttribute(false)]
+ [ComVisible (false)]
public unsafe override int GetCharCount (byte *bytes, int count)
{
return count;
}
[CLSCompliantAttribute(false)]
+ [ComVisible (false)]
public unsafe override int GetByteCount (char *chars, int count)
{
return count;
@@ -387,12 +396,14 @@
#if NET_2_0
[MonoTODO ("we have simple override to match method signature.")]
+ [ComVisible (false)]
public override Decoder GetDecoder ()
{
return base.GetDecoder ();
}
[MonoTODO ("we have simple override to match method signature.")]
+ [ComVisible (false)]
public override Encoder GetEncoder ()
{
return base.GetEncoder ();
Modified: trunk/mcs/class/corlib/System.Text/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Text/ChangeLog 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/ChangeLog 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -1,3 +1,22 @@
+2006-05-30 Gert Driesen <[EMAIL PROTECTED]>
+
+ * ASCIIEncoding.cs: Marked class ComVisible (true) on 2.0 profile.
+ Marked 2.0-only members as ComVisible (false).
+ * Decoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
+ 2.0-only members as ComVisible (false).
+ * Encoder.cs: Marked class ComVisible (true) on 2.0 profile. Marked
+ 2.0-only members as ComVisible (false).
+ * Encoding.cs: Marked class ComVisible (true) on 2.0 profile. Marked
+ 2.0-only members as ComVisible (false).
+ * NormalizationForm.cs: Marked ComVisible (true).
+ * StringBuilder.cs: Marked class ComVisible (true) on 2.0 profile.
+ Marked 2.0-only methods as ComVisible (false).
+ * UnicodeEncoding.cs: GetString (byte[], int, int) is only available
+ in 2.0 profile. Marked 2.0-only methods ComVisible (false). Added
+ missing ctor in 2.0 profile, and marked in MonoTODO.
+ * UTF7Encoding.cs: Marked class ComVisible (true) on 2.0 profile.
+ * UTF8Encoding.cs: Marked 2.0-only methods as ComVisible (false).
+
2006-05-25 Atsushi Enomoto <[EMAIL PROTECTED]>
* EncodingInfo.cs, Encoding.cs :
Modified: trunk/mcs/class/corlib/System.Text/Decoder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/Decoder.cs 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/Decoder.cs 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -29,6 +29,9 @@
using System.Runtime.InteropServices;
[Serializable]
+#if NET_2_0
+[ComVisible (true)]
+#endif
public abstract class Decoder
{
@@ -39,6 +42,7 @@
DecoderFallback fallback = new DecoderReplacementFallback ();
DecoderFallbackBuffer fallback_buffer;
+ [ComVisible (false)]
public DecoderFallback Fallback {
get { return fallback; }
set {
@@ -49,6 +53,7 @@
}
}
+ [ComVisible (false)]
public DecoderFallbackBuffer FallbackBuffer {
get {
if (fallback_buffer == null)
@@ -66,6 +71,7 @@
char[] chars,
int charIndex);
#if NET_2_0
+ [ComVisible (false)]
public virtual int GetCharCount (byte [] bytes, int index, int count,
bool flush)
{
if (flush)
@@ -74,6 +80,7 @@
}
[CLSCompliant (false)]
+ [ComVisible (false)]
public unsafe virtual int GetCharCount (byte* bytes, int count, bool
flush)
{
if (bytes == null)
@@ -99,6 +106,7 @@
}
[CLSCompliant (false)]
+ [ComVisible (false)]
public unsafe virtual int GetChars (byte* bytes, int byteCount,
char* chars, int charCount, bool flush)
{
@@ -111,6 +119,7 @@
return GetChars (barr, 0, byteCount, carr, 0, flush);
}
+ [ComVisible (false)]
public virtual void Reset ()
{
if (fallback_buffer != null)
@@ -118,6 +127,7 @@
}
[CLSCompliant (false)]
+ [ComVisible (false)]
public unsafe virtual void Convert (
byte* bytes, int byteCount,
char* chars, int charCount, bool flush,
@@ -137,6 +147,7 @@
charsUsed = GetChars (bytes, bytesUsed, chars, charCount,
flush);
}
+ [ComVisible (false)]
public virtual void Convert (
byte [] bytes, int byteIndex, int byteCount,
char [] chars, int charIndex, int charCount, bool flush,
Modified: trunk/mcs/class/corlib/System.Text/Encoder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/Encoder.cs 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/Encoder.cs 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -29,6 +29,9 @@
using System.Runtime.InteropServices;
[Serializable]
+#if NET_2_0
+[ComVisible (true)]
+#endif
public abstract class Encoder
{
@@ -39,6 +42,7 @@
EncoderFallback fallback = new EncoderReplacementFallback ();
EncoderFallbackBuffer fallback_buffer;
+ [ComVisible (false)]
public EncoderFallback Fallback {
get { return fallback; }
set {
@@ -49,6 +53,7 @@
}
}
+ [ComVisible (false)]
public EncoderFallbackBuffer FallbackBuffer {
get {
if (fallback_buffer == null)
@@ -68,6 +73,7 @@
#if NET_2_0
[CLSCompliant (false)]
+ [ComVisible (false)]
public unsafe virtual int GetByteCount (char* chars, int charCount,
bool flush)
{
if (chars == null)
@@ -81,6 +87,7 @@
}
[CLSCompliant (false)]
+ [ComVisible (false)]
public unsafe virtual int GetBytes (char* chars, int charCount,
byte* bytes, int byteCount, bool flush)
{
@@ -93,6 +100,7 @@
return GetBytes (carr, 0, charCount, barr, 0, flush);
}
+ [ComVisible (false)]
public virtual void Reset ()
{
if (fallback_buffer != null)
@@ -100,6 +108,7 @@
}
[CLSCompliant (false)]
+ [ComVisible (false)]
public unsafe virtual void Convert (
char* chars, int charCount,
byte* bytes, int byteCount, bool flush,
@@ -119,6 +128,7 @@
bytesUsed = GetBytes (chars, charsUsed, bytes, byteCount,
flush);
}
+ [ComVisible (false)]
public virtual void Convert (
char [] chars, int charIndex, int charCount,
byte [] bytes, int byteIndex, int byteCount, bool flush,
Modified: trunk/mcs/class/corlib/System.Text/Encoding.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/Encoding.cs 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/Encoding.cs 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -35,6 +35,9 @@
using System.Runtime.InteropServices;
[Serializable]
+#if NET_2_0
+[ComVisible (true)]
+#endif
public abstract class Encoding
#if NET_2_0
: ICloneable
@@ -99,6 +102,7 @@
get { return is_readonly; }
}
+ [ComVisible (false)]
public virtual bool IsSingleByte {
get { return false; }
}
@@ -501,7 +505,7 @@
#if !ECMA_COMPAT
#if NET_2_0
-
+ [ComVisible (false)]
public virtual object Clone ()
{
Encoding e = (Encoding) MemberwiseClone ();
@@ -1056,6 +1060,7 @@
#if NET_2_0
[CLSCompliantAttribute(false)]
+ [ComVisible (false)]
public unsafe virtual int GetByteCount (char *chars, int count)
{
if (chars == null)
@@ -1071,6 +1076,7 @@
}
[CLSCompliantAttribute(false)]
+ [ComVisible (false)]
public unsafe virtual int GetCharCount (byte *bytes, int count)
{
if (bytes == null)
@@ -1085,6 +1091,7 @@
}
[CLSCompliantAttribute(false)]
+ [ComVisible (false)]
public unsafe virtual int GetChars (byte *bytes, int byteCount, char
*chars, int charCount)
{
if (bytes == null)
@@ -1111,6 +1118,7 @@
}
[CLSCompliantAttribute(false)]
+ [ComVisible (false)]
public unsafe virtual int GetBytes (char *chars, int charCount, byte
*bytes, int byteCount)
{
if (bytes == null)
Modified: trunk/mcs/class/corlib/System.Text/NormalizationForm.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/NormalizationForm.cs 2006-05-29
22:09:55 UTC (rev 61249)
+++ trunk/mcs/class/corlib/System.Text/NormalizationForm.cs 2006-05-30
09:02:37 UTC (rev 61250)
@@ -28,8 +28,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
+
+using System.Runtime.InteropServices;
+
namespace System.Text
{
+ [ComVisible (true)]
public enum NormalizationForm {
FormC = 1,
FormD = 2,
Modified: trunk/mcs/class/corlib/System.Text/StringBuilder.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/StringBuilder.cs 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/StringBuilder.cs 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -38,10 +38,14 @@
//
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
namespace System.Text {
[Serializable]
+#if NET_2_0
+ [ComVisible (true)]
+#endif
[MonoTODO ("Fix serialization compatibility with MS.NET")]
public sealed class StringBuilder
#if NET_2_0
@@ -476,11 +480,13 @@
}
#if NET_2_0
+ [ComVisible (false)]
public StringBuilder AppendLine ()
{
return Append (System.Environment.NewLine);
}
+ [ComVisible (false)]
public StringBuilder AppendLine (string value)
{
return Append (value).Append
(System.Environment.NewLine);
@@ -683,6 +689,7 @@
}
#if NET_2_0
+ [ComVisible (false)]
public void CopyTo (int sourceIndex, char [] destination, int
destinationIndex, int count)
{
if (destination == null)
Modified: trunk/mcs/class/corlib/System.Text/UTF7Encoding.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/UTF7Encoding.cs 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/UTF7Encoding.cs 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -28,8 +28,12 @@
{
using System;
+using System.Runtime.InteropServices;
[Serializable]
+#if NET_2_0
+[ComVisible (true)]
+#endif
[MonoTODO ("Fix serialization compatibility with MS.NET")]
#if ECMA_COMPAT
internal
Modified: trunk/mcs/class/corlib/System.Text/UTF8Encoding.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/UTF8Encoding.cs 2006-05-29 22:09:55 UTC
(rev 61249)
+++ trunk/mcs/class/corlib/System.Text/UTF8Encoding.cs 2006-05-30 09:02:37 UTC
(rev 61250)
@@ -1074,6 +1074,7 @@
}
[MonoTODO]
+ [ComVisible (false)]
public override string GetString (byte [] bytes, int index, int count)
{
// hmm, does this override make any sense?
Modified: trunk/mcs/class/corlib/System.Text/UnicodeEncoding.cs
===================================================================
--- trunk/mcs/class/corlib/System.Text/UnicodeEncoding.cs 2006-05-29
22:09:55 UTC (rev 61249)
+++ trunk/mcs/class/corlib/System.Text/UnicodeEncoding.cs 2006-05-30
09:02:37 UTC (rev 61250)
@@ -29,8 +29,12 @@
{
using System;
+using System.Runtime.InteropServices;
[Serializable]
+#if NET_2_0
+[ComVisible (true)]
+#endif
[MonoTODO ("Fix serialization compatibility with MS.NET")]
public class UnicodeEncoding : Encoding
{
@@ -78,6 +82,14 @@
windows_code_page = UNICODE_CODE_PAGE;
}
+#if NET_2_0
+ [MonoTODO ("Implement throwOnInvalidBytes")]
+ public UnicodeEncoding (bool bigEndian, bool byteOrderMark, bool
throwOnInvalidBytes)
+ : this (bigEndian, byteOrderMark)
+ {
+ }
+#endif
+
// Get the number of bytes needed to encode a character buffer.
public override int GetByteCount (char[] chars, int index, int count)
{
@@ -103,6 +115,7 @@
#if NET_2_0
[CLSCompliantAttribute (false)]
+ [ComVisible (false)]
public unsafe override int GetByteCount (char* chars, int count)
{
if (chars == null)
@@ -195,6 +208,7 @@
#if NET_2_0
[CLSCompliantAttribute (false)]
+ [ComVisible (false)]
public unsafe override int GetBytes (char* chars, int charCount,
byte* bytes, int byteCount)
{
@@ -240,6 +254,7 @@
#if NET_2_0
[CLSCompliantAttribute (false)]
+ [ComVisible (false)]
public unsafe override int GetCharCount (byte* bytes, int count)
{
if (bytes == null)
@@ -285,6 +300,7 @@
#if NET_2_0
[CLSCompliantAttribute (false)]
+ [ComVisible (false)]
public unsafe override int GetChars (byte* bytes, int byteCount,
char* chars, int charCount)
{
@@ -299,9 +315,9 @@
return GetCharsInternal (bytes, byteCount, chars, charCount);
}
-#endif
// Decode a buffer of bytes into a string.
+ [ComVisible (false)]
public unsafe override String GetString (byte [] bytes, int index, int
count)
{
if (bytes == null)
@@ -324,6 +340,7 @@
return s;
}
+#endif
private unsafe int GetCharsInternal (byte* bytes, int byteCount,
char* chars, int charCount)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches