Wed Nov 14 16:30:27 CET 2001 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Wed, 14 Nov 2001 15:18:05 +0000 (15:18 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Wed, 14 Nov 2001 15:18:05 +0000 (15:18 -0000)
* Linux.cs: a '/' is a valid char in a file path.

Wed Nov 14 16:31:19 CET 2001 Paolo Molaro <lupus@ximian.com>

* AppDomain.cs: rename dummy interface _AppDomain to AppDomain_Intf.
* Array.cs: fix Array.Copy.
* AssemblyLoadEventArgs.cs: rename field.
* CLSCompliantAttribute.cs: use correct name for the class.
* Char.cs: fix IsLetter.
* Console.cs, DateTime.cs, Decimal.cs, IConvertible.cs, Math.cs,
SByte.cs, UInt16.cs, UInt32.cs, UInt64.cs, UIntPtr.cs: CLSCompliant updates.
* Convert.cs: CLSCompliant updates, add ChangeType() methods.
* Delegate.cs: renamed target field to m_target.
* Enum.cs: added missing methods.
* MonoType.cs: add a constructor and some needed properties.
* Object.cs: implement GetType().
* String.cs: CLSCompliant updates. Fixes everywhere to remove the
ending 0 char.
* Type.cs: add missing methods/properties.

Wed Nov 14 16:45:49 CET 2001 Paolo Molaro <lupus@ximian.com>

* ArrayList.cs: implement ArrayListEnumerator.
* Hashtable.cs: hardcode the prime number table.

Wed Nov 14 16:47:07 CET 2001 Paolo Molaro <lupus@ximian.com>

* Calendar.cs: CLSCompliant updates.

Wed Nov 14 16:47:47 CET 2001 Paolo Molaro <lupus@ximian.com>

* CheckPermission.cs: disable ModeAccess() code: it's wrong.
* FileStream.cs: only trow an exception if the read failed in ReadByte().
* StreamReader.cs: implement Peek and Read.
* TextWriter.cs: CLSCompliant updates.

Wed Nov 14 16:53:28 CET 2001 Paolo Molaro <lupus@ximian.com>

* Assembly.cs: implement some of the Load() methods.
* ConstructorInfo.cs: some missing stubs and fields.
* FieldInfo.cs: IsInitOnly property.
* ParameterInfo.cs: stubs for missing properties.
* ParameterModifier.cs: implemented class.

Wed Nov 14 17:01:45 CET 2001 Paolo Molaro <lupus@ximian.com>

* ConstructorBuilder.cs: added missing stubs and some implementation.
* CustomAttributeBuilder.cs: added.
* EventBuilder.cs: added.
* FieldBuilder.cs: updates.
* MethodBuilder.cs: stuff to implement P/Invoke methods.
* ModuleBuilder.cs: added GetArrayMethod() stub.
* ParameterBuilder.cs, PropertyBuilder.cs: updates.
* TypeBuilder.cs: updates and stubs.

Wed Nov 14 17:02:57 CET 2001 Paolo Molaro <lupus@ximian.com>

* CallingConvention.cs: add missing Winapi.

Wed Nov 14 17:03:30 CET 2001 Paolo Molaro <lupus@ximian.com>

* IFormatterConverter.cs, SerializationInfo.cs: CLSCompliant updates.

Wed Nov 14 17:04:30 CET 2001 Paolo Molaro <lupus@ximian.com>

* MD5CryptoServiceProvider.cs, SHA1CryptoServiceProvider.cs,
SHA256Managed.cs: CLSCompliant updates.

Wed Nov 14 17:05:22 CET 2001 Paolo Molaro <lupus@ximian.com>

* Encoding.cs: renamed some fields.
* StringBuilder.cs: CLSCompliant updates.

Wed Nov 14 17:06:18 CET 2001 Paolo Molaro <lupus@ximian.com>

* Overlapped.cs, ThreadPool.cs, Timer.cs: CLSCompliant updates.

svn path=/trunk/mcs/; revision=1351

70 files changed:
mcs/class/corlib/Linux/ChangeLog
mcs/class/corlib/Linux/Linux.cs
mcs/class/corlib/System.Collections/ArrayList.cs
mcs/class/corlib/System.Collections/ChangeLog
mcs/class/corlib/System.Collections/Hashtable.cs
mcs/class/corlib/System.Globalization/Calendar.cs
mcs/class/corlib/System.Globalization/ChangeLog
mcs/class/corlib/System.IO/ChangeLog
mcs/class/corlib/System.IO/CheckPermission.cs
mcs/class/corlib/System.IO/FileStream.cs
mcs/class/corlib/System.IO/StreamReader.cs
mcs/class/corlib/System.IO/TextWriter.cs
mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs [new file with mode: 0755]
mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs [new file with mode: 0755]
mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs [new file with mode: 0755]
mcs/class/corlib/System.Reflection.Emit/FieldBuilder.cs
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs
mcs/class/corlib/System.Reflection.Emit/PropertyBuilder.cs
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
mcs/class/corlib/System.Reflection/Assembly.cs
mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/ConstructorInfo.cs
mcs/class/corlib/System.Reflection/FieldInfo.cs
mcs/class/corlib/System.Reflection/ParameterInfo.cs
mcs/class/corlib/System.Reflection/ParameterModifier.cs [new file with mode: 0755]
mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs
mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
mcs/class/corlib/System.Runtime.Serialization/ChangeLog
mcs/class/corlib/System.Runtime.Serialization/IFormatterConverter.cs
mcs/class/corlib/System.Runtime.Serialization/SerializationInfo.cs
mcs/class/corlib/System.Security.Cryptography/ChangeLog
mcs/class/corlib/System.Security.Cryptography/MD5CryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/SHA1CryptoServiceProvider.cs
mcs/class/corlib/System.Security.Cryptography/SHA256Managed.cs
mcs/class/corlib/System.Text/ChangeLog
mcs/class/corlib/System.Text/Encoding.cs
mcs/class/corlib/System.Text/StringBuilder.cs
mcs/class/corlib/System.Threading/ChangeLog
mcs/class/corlib/System.Threading/Overlapped.cs
mcs/class/corlib/System.Threading/ThreadPool.cs
mcs/class/corlib/System.Threading/Timer.cs
mcs/class/corlib/System/AppDomain.cs
mcs/class/corlib/System/Array.cs
mcs/class/corlib/System/AssemblyLoadEventArgs.cs
mcs/class/corlib/System/CLSCompliantAttribute.cs
mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/Char.cs
mcs/class/corlib/System/Console.cs
mcs/class/corlib/System/Convert.cs
mcs/class/corlib/System/DateTime.cs
mcs/class/corlib/System/Decimal.cs
mcs/class/corlib/System/Delegate.cs
mcs/class/corlib/System/Enum.cs
mcs/class/corlib/System/IConvertible.cs
mcs/class/corlib/System/Math.cs
mcs/class/corlib/System/MonoType.cs
mcs/class/corlib/System/Object.cs
mcs/class/corlib/System/SByte.cs
mcs/class/corlib/System/String.cs
mcs/class/corlib/System/Type.cs
mcs/class/corlib/System/UInt16.cs
mcs/class/corlib/System/UInt32.cs
mcs/class/corlib/System/UInt64.cs
mcs/class/corlib/System/UIntPtr.cs
mcs/class/corlib/System/UnhandledExceptionEventArgs.cs
mcs/class/corlib/Unix/Wrapper.cs

index f5af7b13c095db1072285ce24ee25284742b9329..c4c1346b4fc362bf515487f8f0abef22da2dcd31 100644 (file)
@@ -1,3 +1,8 @@
+
+Wed Nov 14 16:30:27 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * Linux.cs: a '/' is a valid char in a file path.
+
 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
 
        * Linux.cs (GetCurrentDirectory): implemented
index 7099d85295669f7ffa2ac7fec49fd304cdb6c1ad..3a0de812a110dac2b27cf85359457ad79c911300 100644 (file)
@@ -104,7 +104,7 @@ namespace System.PAL
                {\r
                        get\r
                        {\r
-                               return new char[] { '/', '\0' };\r
+                               return new char[] { '\0' };\r
                        }\r
                }\r
 \r
index 769c8a2ff47730b996b87382070bcddd75823018..c3b2652ab2be88f824ea2dd7591d72acca4dc623 100644 (file)
@@ -288,21 +288,39 @@ namespace System.Collections {
                }\r
 \r
                private class ArrayListEnumerator : IEnumerator {\r
-                       // TODO: Constructor should take a snapshot\r
-                       public ArrayListEnumerator(int index, int count){}\r
+                       private object[] data;\r
+                       private int idx;\r
+                       private int start;\r
+                       private int num;\r
+\r
+                       public ArrayListEnumerator(int index, int count, object[] items) {\r
+                               data = items;\r
+                               start = index;\r
+                               num = count;\r
+                               idx = start - 1;\r
+                       }\r
 \r
-                       // TODO: Implement these methods...\r
-                       public object Current {get{return null;}}\r
-                       public bool MoveNext(){return true;}\r
-                       public void Reset(){}\r
+                       public object Current {\r
+                               get {\r
+                                       return data [idx];\r
+                               }\r
+                       }\r
+                       public bool MoveNext() {\r
+                               if (++idx < start + num)\r
+                                       return true;\r
+                               return false;\r
+                       }\r
+                       public void Reset() {\r
+                               idx = start - 1;\r
+                       }\r
                }\r
 \r
                public virtual IEnumerator GetEnumerator () {\r
-                       return new ArrayListEnumerator(0, this.Count);\r
+                       return new ArrayListEnumerator(0, this.Count, dataArray);\r
                }\r
 \r
                public virtual IEnumerator GetEnumerator (int index, int count) {\r
-                       return new ArrayListEnumerator(index, count);\r
+                       return new ArrayListEnumerator(index, count, dataArray);\r
                }\r
 \r
                public virtual ArrayList GetRange (int index, int count) {\r
index 40bda3c0f104a9e296bd359fe3b43d628a9faf81..da8dee649609f91da905f8142f2ffe61f3397b3f 100644 (file)
@@ -1,3 +1,9 @@
+
+Wed Nov 14 16:45:49 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * ArrayList.cs: implement ArrayListEnumerator.
+       * Hashtable.cs: hardcode the prime number table.
+
 2001-11-06 Nick Drochak <ndrochak@gol.com>
        * Queue.cs: Fixes from Ricardardo.  QueueTest also updated.
 
index b964d755075f26f8d32cea34a4020fc9c5cb967a..567f65380c75c8480314db2af1265bbd4eaec0d0 100644 (file)
@@ -52,8 +52,42 @@ namespace System.Collections {
                private IHashCodeProvider hcpRef;\r
                private IComparer comparerRef;\r
 \r
-               public static int [] primeTbl = {};\r
-\r
+               public static int [] primeTbl = {\r
+                       11,\r
+                       19,\r
+                       37,\r
+                       73,\r
+                       109,\r
+                       163,\r
+                       251,\r
+                       367,\r
+                       557,\r
+                       823,\r
+                       1237,\r
+                       1861,\r
+                       2777,\r
+                       4177,\r
+                       6247,\r
+                       9371,\r
+                       14057,\r
+                       21089,\r
+                       31627,\r
+                       47431,\r
+                       71143,\r
+                       106721,\r
+                       160073,\r
+                       240101,\r
+                       360163,\r
+                       540217,\r
+                       810343,\r
+                       1215497,\r
+                       1823231,\r
+                       2734867,\r
+                       4102283,\r
+                       6153409,\r
+                       9230113,\r
+                       13845163\r
+               };\r
 \r
                // Class constructor\r
 \r
@@ -67,11 +101,11 @@ namespace System.Collections {
                        // particular implementation, probably the increment\r
                        // shouldn't be linear? Consider this as a hack\r
                        // or as a placeholder for future improvements.\r
-                       int size = 0x2000/ALLOC_GRAIN;\r
+                       /*int size = 0x2000/ALLOC_GRAIN;\r
                        primeTbl = new int [size];\r
                        for (int x = 53, i = 0;i<size;x+= ALLOC_GRAIN, i++) {\r
                                primeTbl [i] = CalcPrime (x);\r
-                       }\r
+                       }*/\r
                }\r
 \r
 \r
index 7e25429606b043a650e83a1a2642d629e6156f07..f9c6fdfe4d8c21734b00deb86f2900a9fc011a9a 100644 (file)
@@ -32,35 +32,59 @@ namespace System.Globalization
                        _MaxDateTime = DateTime.MaxValue;
                        _MinDateTime = DateTime.MinValue;
                }
+               [CLSCompliant(false)]
                protected int _TwoDigitYearMax;
 
+               [CLSCompliant(false)]
                protected static int[] _DaysInMonth = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+               [CLSCompliant(false)]
                protected static int[] _DaysInMonthLeap = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
                
 
                // these can be overridden, for example using "new protected const int _MinYear = 1;"
+               [CLSCompliant(false)]
                protected const int _MinYear = 1;
+               [CLSCompliant(false)]
                protected const int _MaxYear = 9999;
+               [CLSCompliant(false)]
                protected const int _MinDay = 0;
+               [CLSCompliant(false)]
                protected const int _MinMonth = 1;
+               [CLSCompliant(false)]
                protected const int _MaxMonth = 12;
+               [CLSCompliant(false)]
                protected const int _MinHour = 0;
+               [CLSCompliant(false)]
                protected const int _MaxHour = 23;
+               [CLSCompliant(false)]
                protected const int _MinMinute = 0;
+               [CLSCompliant(false)]
                protected const int _MaxMinute = 59;
+               [CLSCompliant(false)]
                protected const int _MinSecond = 0;
+               [CLSCompliant(false)]
                protected const int _MaxSecond = 59;
+               [CLSCompliant(false)]
                protected const int _MinMillisecond = 0;
+               [CLSCompliant(false)]
                protected const int _MaxMillisecond = 999;
 
+               [CLSCompliant(false)]
                private const long _TicksPerMillisecond = 10000;
+               [CLSCompliant(false)]
                private const long _TicksPerSecond = 10000000;
+               [CLSCompliant(false)]
                private const long _TicksPerMinute = 600000000;
+               [CLSCompliant(false)]
                private const long _TicksPerHour = 36000000000;
+               [CLSCompliant(false)]
                private const long _TicksPerDay = 864000000000;
+               [CLSCompliant(false)]
                private const long _TicksPerWeek = 6048000000000;
 
+               [CLSCompliant(false)]
                protected DateTime _MaxDateTime;
+               [CLSCompliant(false)]
                protected DateTime _MinDateTime;
 
                
index 0243812bc184ca060896170ce714f571e91a5f99..be3fd0e2fc539cccb95bb1052b7d33f024d7cf8e 100644 (file)
@@ -1,3 +1,8 @@
+\r
+Wed Nov 14 16:47:07 CET 2001 Paolo Molaro <lupus@ximian.com>\r
+\r
+       * Calendar.cs: CLSCompliant updates.\r
+\r
 2001-11-04  Martin Weindel <martin.weindel@t-online.de>\r
         * NumberFormatInfo.cs: fixed minor bug in Clone with readonly flag\r
 \r
index b689c868c64a66a46c3f25f5cecd1148126b7436..15a6d4b7b76d4373de26f131c4fb95137dca8465 100644 (file)
@@ -1,3 +1,11 @@
+
+Wed Nov 14 16:47:47 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * CheckPermission.cs: disable ModeAccess() code: it's wrong.
+       * FileStream.cs: only trow an exception if the read failed in ReadByte().
+       * StreamReader.cs: implement Peek and Read.
+       * TextWriter.cs: CLSCompliant updates.
+
 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
 
        * FileNotFoundException.cs: Added some constructors
index 20e1a44b4a25746c361352a9e41cdd2d71085f3a..5b912502e56140882510f1a411aff58c5abe685c 100644 (file)
@@ -53,6 +53,7 @@ namespace System.IO
                
                public static void ModeAccess(FileMode mode, FileAccess access, string path, bool exists)
                {
+                       return;
                        // TODO: this logic isn't entirely complete and accurate, yet
                        if((mode & (FileMode.CreateNew | FileMode.Create)) != 0)
                        {
index c04dff73dcfc6a6b6eb53a57002d1db0fd6852b5..55c8be8fbc83c379edd9da0b871a05ffd4a8da1d 100644 (file)
@@ -137,9 +137,12 @@ namespace System.IO
                public unsafe override int ReadByte ()
                {
                        byte[] val = new byte[1];
+                       int res = Read (val, 0, 1);
                        
-                       if (Read (val, 0, 1) != 1)
+                       if (res == -1)
                                throw new IOException();
+                       if (res == 0)
+                               return -1;
                        
                        return val[0];
                }
index 4bc45271276899d1e6fc2ba70357ef9c55adce33..2219a7d5a0b04bca88ce137dc31438055db672fa 100644 (file)
@@ -83,12 +83,16 @@ namespace System.IO {
        \r
                public override int Peek ()\r
                {\r
-                       return -1;\r
+                       // FIXME: handle encoding....\r
+                       int val = internalStream.ReadByte ();\r
+                       if (val != -1)\r
+                               internalStream.Seek (-1, SeekOrigin.Current);\r
+                       return val;\r
                }\r
 \r
                public override int Read ()\r
                {\r
-                       return -1;\r
+                       return internalStream.ReadByte ();\r
                }\r
 \r
                public override int Read (char[] buffer, int index, int count)\r
index e356e37552571b6ee95fd88ee3f348a745b1d1d4..fb48686d678668835af239d2168fd69106a55934 100644 (file)
@@ -113,11 +113,13 @@ namespace System.IO {
                        // do nothing\r
                }\r
                \r
+               [CLSCompliant(false)]\r
                 public virtual void Write (uint value)\r
                {\r
                        Write (value.ToString (internalFormatProvider));\r
                }\r
                \r
+               [CLSCompliant(false)]\r
                 public virtual void Write (ulong value)\r
                {\r
                        Write (value.ToString (internalFormatProvider));\r
@@ -213,12 +215,14 @@ namespace System.IO {
                        WriteLine();\r
                }\r
                \r
+               [CLSCompliant(false)]\r
                 public virtual void WriteLine (uint value)\r
                {\r
                        Write (value);\r
                        WriteLine();\r
                }\r
                \r
+               [CLSCompliant(false)]\r
                 public virtual void WriteLine (ulong value)\r
                {\r
                        Write (value);\r
index 6f9af39145fc115221373406c5b69fc4837f5a69..4c7bed1b3329be8f958c09d53d90b5cfe042f47a 100644 (file)
@@ -1,3 +1,15 @@
+
+Wed Nov 14 17:01:45 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * ConstructorBuilder.cs: added missing stubs and some implementation.
+       * CustomAttributeBuilder.cs: added.
+       * EventBuilder.cs: added.
+       * FieldBuilder.cs: updates.
+       * MethodBuilder.cs: stuff to implement P/Invoke methods.
+       * ModuleBuilder.cs: added GetArrayMethod() stub.
+       * ParameterBuilder.cs, PropertyBuilder.cs: updates.
+       * TypeBuilder.cs: updates and stubs.
+
 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
 
        * TypeBuilder.cs: Added implementation for TypeHandle.
index 83a888b0ae8fe430884ab1b12fd7da2908f8d9ad..e3b293d9cb0ef4987ec8583d28c3880b018de28a 100644 (file)
@@ -11,9 +11,13 @@ using System;
 using System.Reflection;
 using System.Reflection.Emit;
 using System.Globalization;
+using System.Security;
+using System.Security.Permissions;
 
 namespace System.Reflection.Emit {
        public sealed class ConstructorBuilder : ConstructorInfo {
+               private ILGenerator ilgen;
+
                public override MethodImplAttributes GetMethodImplementationFlags() {
                        return (MethodImplAttributes)0;
                }
@@ -23,11 +27,32 @@ namespace System.Reflection.Emit {
                public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) {
                        return null;
                }
+               public override object Invoke(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) {
+                       return null;
+               }
+
                public override RuntimeMethodHandle MethodHandle { get {return new RuntimeMethodHandle ();} }
                public override MethodAttributes Attributes { get {return (MethodAttributes)0;} }
                public override Type ReflectedType { get {return null;}}
                public override Type DeclaringType { get {return null;}}
+               public Type ReturnType { get {return null;}}
                public override string Name { get {return ".ctor";}}
+               public string Signature {
+                       get {return "constructor signature";}
+               }
+               
+               public bool InitLocals { /* FIXME */
+                       get {return false;} 
+                       set {return;}
+               }
+
+               public void AddDeclarativeSecurity( SecurityAction action, PermissionSet pset) {
+               }
+
+               public ParameterBuilder DefineParameter(int iSequence, ParameterAttributes attributes, string strParamName) {
+                       return null;
+               }
+               
 
                public override bool IsDefined (Type attribute_type, bool inherit) {return false;}
 
@@ -35,5 +60,31 @@ namespace System.Reflection.Emit {
 
                public override object [] GetCustomAttributes (Type attribute_type, bool inherit) {return null;}
 
+               public ILGenerator GetILGenerator () {
+                       return GetILGenerator (256);
+               }
+               public ILGenerator GetILGenerator (int size) {
+                       //ilgen = new ILGenerator (this, size);
+                       return null;
+               }
+
+               public void SetCustomAttribute( CustomAttributeBuilder customBuilder) {
+               }
+               public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute) {
+               }
+               public void SetImplementationFlags( MethodImplAttributes attributes) {
+               }
+               public Module GetModule() {
+                       return null;
+               }
+               public MethodToken GetToken() {
+                       return new MethodToken();
+               }
+               public void SetSymCustomAttribute( string name, byte[] data) {
+               }
+               public override string ToString() {
+                       return "constructor";
+               }
+
        }
 }
diff --git a/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs
new file mode 100755 (executable)
index 0000000..267e7be
--- /dev/null
@@ -0,0 +1,30 @@
+
+//
+// System.Reflection.Emit/CustomAttributeBuilder.cs
+//
+// Author:
+//   Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2001 Ximian, Inc.  http://www.ximian.com
+//
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+
+namespace System.Reflection.Emit {
+       public class CustomAttributeBuilder {
+               public CustomAttributeBuilder( ConstructorInfo con, object[] constructorArgs)
+                       : this (con, constructorArgs, null, null, null, null) {
+               }
+               public CustomAttributeBuilder( ConstructorInfo con, object[] constructorArgs, FieldInfo[] namedFields, object[] fieldValues)
+                       : this (con, constructorArgs, null, null, namedFields, fieldValues) {
+               }
+               public CustomAttributeBuilder( ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues)
+                       : this (con, constructorArgs, namedProperties, propertyValues, null, null) {
+               }
+               public CustomAttributeBuilder( ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues, FieldInfo[] namedFields, object[] fieldValues) {
+               }
+
+       }
+}
diff --git a/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/EnumBuilder.cs
new file mode 100755 (executable)
index 0000000..c1ee333
--- /dev/null
@@ -0,0 +1,20 @@
+
+//
+// System.Reflection.Emit/EnumBuilder.cs
+//
+// Author:
+//   Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2001 Ximian, Inc.  http://www.ximian.com
+//
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+
+namespace System.Reflection.Emit {
+       /*public sealed class EnumBuilder : Type {
+       }*/
+}
diff --git a/mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/EventBuilder.cs
new file mode 100755 (executable)
index 0000000..02844a3
--- /dev/null
@@ -0,0 +1,40 @@
+
+//
+// System.Reflection.Emit/EventBuilder.cs
+//
+// Author:
+//   Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2001 Ximian, Inc.  http://www.ximian.com
+//
+
+using System;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace System.Reflection.Emit {
+       public sealed class EventBuilder {
+               public void AddOtherMethod( MethodBuilder mdBuilder) {
+               }
+               public EventToken GetEventToken() {
+                       return new EventToken();
+               }
+               public void SetAddOnMethod( MethodBuilder mdBuilder) {
+               }
+               public void SetRaiseMethod( MethodBuilder mdBuilder) {
+               }
+               public void SetRemoveOnMethod( MethodBuilder mdBuilder) {
+               }
+
+               public void SetCustomAttribute( CustomAttributeBuilder customBuilder) {
+               }
+               public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute) {
+               }
+
+
+       }
+}
+
index aeaeaeeff21124e9ca35c1b56830baba0d2bf104..edc610cc946c993dfaf5f7d0e099fbcd235304f4 100755 (executable)
@@ -31,7 +31,7 @@ namespace System.Reflection.Emit {
                        this.type = type;
                        offset = -1;
                        typeb = tb;
-                       table_idx = tb.module.assemblyb.get_next_table_index (0x04, true);
+                       table_idx = tb.pmodule.assemblyb.get_next_table_index (0x04, true);
                }
 
                public override FieldAttributes Attributes {
index bdfaaf5ec64079d483f64c9c8446afa294fefd59..8da0037a7ecde01021cb9a4e1be81b3b8dee6f32 100755 (executable)
@@ -13,6 +13,7 @@ using System.Reflection;
 using System.Reflection.Emit;
 using System.Globalization;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
        public sealed class MethodBuilder : MethodInfo {
@@ -26,22 +27,37 @@ namespace System.Reflection.Emit {
                private ILGenerator ilgen;
                internal TypeBuilder type;
                private ParameterBuilder[] pinfo;
+               private string pi_dll;
+               private string pi_entry;
+               private CharSet ncharset;
+               private CallingConvention native_cc;
+               private CallingConventions call_conv;
 
                internal MethodBuilder (TypeBuilder tb, string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
                        this.name = name;
                        this.attrs = attributes;
-                       // call conv
+                       this.call_conv = callingConvention;
                        this.rtype = returnType;
                        if (parameterTypes != null) {
                                this.parameters = new Type [parameterTypes.Length];
                                System.Array.Copy (parameterTypes, this.parameters, parameterTypes.Length);
                        }
                        type = tb;
-                       table_idx = tb.module.assemblyb.get_next_table_index (0x06, true);
+                       table_idx = tb.pmodule.assemblyb.get_next_table_index (0x06, true);
+               }
+
+               internal MethodBuilder (TypeBuilder tb, string name, MethodAttributes attributes, 
+                       CallingConventions callingConvention, Type returnType, Type[] parameterTypes, 
+                       String dllName, String entryName, CallingConvention nativeCConv, CharSet nativeCharset) 
+                       : this (tb, name, attributes, callingConvention, returnType, parameterTypes) {
+                       pi_dll = dllName;
+                       pi_entry = entryName;
+                       native_cc = nativeCConv;
+                       ncharset = nativeCharset;
                }
                
                public override Type ReturnType {get {return rtype;}}
-               public override Type ReflectedType {get {return null;}}
+               public override Type ReflectedType {get {return type;}}
                public override Type DeclaringType {get {return type;}}
                public override string Name {get {return name;}}
                public override RuntimeMethodHandle MethodHandle {get {return mhandle;}}
@@ -101,6 +117,13 @@ namespace System.Reflection.Emit {
                        if (ilgen != null)
                                ilgen.label_fixup ();
                }
+
+               public void SetCustomAttribute( CustomAttributeBuilder customBuilder) {
+               }
+               public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute) {
+               }
+               public void SetImplementationFlags( MethodImplAttributes attributes) {
+               }
        }
 }
 
index 791941ba60a2a01d692bc3bd4b20c41bbb9cb707..43605ce6839d1d0dcc82fa38560384953ffb2344 100644 (file)
@@ -66,5 +66,9 @@ namespace System.Reflection.Emit {
                        return DefineType (name, attr, parent, null);
                }
 
+               public MethodInfo GetArrayMethod( Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
+                       return null;
+               }
+
        }
 }
index d3bdb3626935716817f179a15b66c669e6cb1837..1e24a75a810adb17c77e259972c23d9695dd3311 100755 (executable)
@@ -28,7 +28,7 @@ namespace System.Reflection.Emit {
                        position = pos;
                        attrs = attributes;
                        methodb = mb;
-                       table_idx = mb.type.module.assemblyb.get_next_table_index (0x08, true);
+                       table_idx = mb.type.pmodule.assemblyb.get_next_table_index (0x08, true);
                }
 
                public virtual int Attributes {
index 4e3913487addd7c7d0df54eec70c225d1affe33c..db724cb74a74762ce7a399c8432e2550f01f400a 100755 (executable)
@@ -35,7 +35,7 @@ namespace System.Reflection.Emit {
                                System.Array.Copy (parameterTypes, this.parameters, this.parameters.Length);
                        }
                        typeb = tb;
-                       table_idx = tb.module.assemblyb.get_next_table_index (0x17, true);
+                       table_idx = tb.pmodule.assemblyb.get_next_table_index (0x17, true);
                }
 
                public override PropertyAttributes Attributes {
index 832ed0537d1bb125094c089ee8ad4fe013780761..e2d744fb91437a629b72e9f6a21b38b451d6ac5b 100644 (file)
@@ -11,10 +11,11 @@ using System;
 using System.Reflection;
 using System.Reflection.Emit;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
        public sealed class TypeBuilder : Type {
-       private string name;
+       private string tname;
        private string nspace;
        private Type parent;
        private Type[] interfaces;
@@ -23,40 +24,56 @@ namespace System.Reflection.Emit {
        private FieldBuilder[] fields;
        private TypeAttributes attrs;
        private int table_idx;
-       internal ModuleBuilder module;
+       internal ModuleBuilder pmodule;
+       private PackingSize packing_size;
+
+       public const int UnspecifiedTypeSize = -1;
 
        internal TypeBuilder (ModuleBuilder mb, string name, TypeAttributes attr, Type parent, Type[] interfaces) {
                        int sep_index;
                        this.parent = parent;
                        this.attrs = attr;
+                       packing_size = PackingSize.Unspecified;
                        sep_index = name.LastIndexOf('.');
                        if (sep_index != -1) {
-                               this.name = name.Substring (sep_index + 1);
+                               this.tname = name.Substring (sep_index + 1);
                                this.nspace = name.Substring (0, sep_index);
                        } else {
-                               this.name = name;
+                               this.tname = name;
                                this.nspace = "";
                        }
                        if (interfaces != null) {
                                this.interfaces = new Type[interfaces.Length];
                                System.Array.Copy (interfaces, this.interfaces, interfaces.Length);
                        }
-                       module = mb;
+                       pmodule = mb;
                        table_idx = mb.assemblyb.get_next_table_index (0x02, true);
        }
 
-       public const int UnspecifiedTypeSize = 1; // FIXME: check the real value
-               
                public override Assembly Assembly {get {return null;}}
                public override string AssemblyQualifiedName {get {return null;}}
-               public override Type BaseType {get {return null;}}
+               public override Type BaseType {get {return parent;}}
                public override Type DeclaringType {get {return null;}}
-               public override string FullName {get {return null;}}
+               public override string FullName {
+                       get {
+                               if (nspace != null)
+                                       return String.Concat (nspace, ".", tname);
+                               return tname;
+                       }
+               }
                //public override Guid GUID {get {return null;}}
-               //public override Module Module {get {return null;}}
-               public override string Name {get {return null;}}
-               //public override string Namespace {get {return null;}}
-               public PackingSize PackingSize {get {return (PackingSize)0;}}
+               public override Module Module {
+                       get {return pmodule;}
+               }
+               public override string Name {
+                       get {return tname;}
+               }
+               public override string Namespace {
+                       get {return nspace;}
+               }
+               public PackingSize PackingSize {
+                       get {return packing_size;}
+               }
                public override Type ReflectedType {get {return null;}}
                public override MemberTypes MemberType { get {return (MemberTypes)0;}}
 
@@ -69,25 +86,88 @@ namespace System.Reflection.Emit {
                public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
                        return null;
                }
+               
+               public TypeBuilder DefineNestedType (string name) {
+                       // FIXME: LAMESPEC: what other attributes should we use here as default?
+                       return DefineNestedType (name, TypeAttributes.Public, typeof(object), null);
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr) {
+                       return DefineNestedType (name, attr, typeof(object), null);
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent) {
+                       return DefineNestedType (name, attr, parent, null);
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, Type[] interfaces) {
+                       TypeBuilder res = new TypeBuilder (pmodule, name, attr, parent, interfaces);
+                       /*if (types != null) {
+                               TypeBuilder[] new_types = new TypeBuilder [types.Length];
+                               System.Array.Copy (types, new_types, types.Length);
+                               new_types [types.Length] = res;
+                               types = new_types;
+                       } else {
+                               types = new TypeBuilder [1];
+                               types [0] = res;
+                       }*/
+                       return res;
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, int typesize) {
+                       return DefineNestedType (name, attr, parent, null);
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, PackingSize packsize) {
+                       return DefineNestedType (name, attr, parent, null);
+               }
+
+               public TypeBuilder DefineNestedType (string name, TypeAttributes attr, Type parent, PackingSize packsize, int typesize) {
+                       return DefineNestedType (name, attr, parent, null);
+               }
+
+               public ConstructorBuilder DefineConstructor( MethodAttributes attributes, CallingConventions callingConvention, Type[] parameterTypes) {
+                       return null;
+               }
+
+               public ConstructorBuilder DefineDefaultConstructor( MethodAttributes attributes) {
+                       return null;
+               }
 
                public MethodBuilder DefineMethod( string name, MethodAttributes attributes, Type returnType, Type[] parameterTypes) {
                        return DefineMethod (name, attributes, CallingConventions.Standard, returnType, parameterTypes);
                }
 
-               public MethodBuilder DefineMethod( string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
-                       MethodBuilder res = new MethodBuilder (this, name, attributes, callingConvention, returnType, parameterTypes);
+               private void append_method (MethodBuilder mb) {
                        if (methods != null) {
                                MethodBuilder[] new_methods = new MethodBuilder [methods.Length+1];
                                System.Array.Copy (methods, new_methods, methods.Length);
-                               new_methods [methods.Length] = res;
+                               new_methods [methods.Length] = mb;
                                methods = new_methods;
                        } else {
                                methods = new MethodBuilder [1];
-                               methods [0] = res;
+                               methods [0] = mb;
                        }
+               }
+
+               public MethodBuilder DefineMethod( string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
+                       MethodBuilder res = new MethodBuilder (this, name, attributes, callingConvention, returnType, parameterTypes);
+                       append_method (res);
                        return res;
                }
 
+               public MethodBuilder DefinePInvokeMethod (string name, string dllName, string entryName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) {
+                       MethodBuilder res = new MethodBuilder (this, name, attributes, callingConvention, returnType, parameterTypes,
+                               dllName, entryName, nativeCallConv, nativeCharSet);
+                       append_method (res);
+                       return res;
+               }
+
+               public MethodBuilder DefinePInvokeMethod (string name, string dllName, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, CallingConvention nativeCallConv, CharSet nativeCharSet) {
+                       return DefinePInvokeMethod (name, dllName, name, attributes, callingConvention, returnType, parameterTypes,
+                               nativeCallConv, nativeCharSet);
+               }
+
                public FieldBuilder DefineField( string fieldName, Type type, FieldAttributes attributes) {
                        FieldBuilder res = new FieldBuilder (this, fieldName, type, attributes);
                        if (fields != null) {
@@ -131,5 +211,23 @@ namespace System.Reflection.Emit {
                public override Type[] GetInterfaces () { return null; }
 
                public override RuntimeTypeHandle TypeHandle { get { return _impl; } }
+
+               public void SetCustomAttribute( CustomAttributeBuilder customBuilder) {
+               }
+               public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute) {
+               }
+
+               public EventBuilder DefineEvent( string name, EventAttributes attributes, Type eventtype) {
+                       return null;
+               }
+
+               public FieldBuilder DefineInitializedData( string name, byte[] data, FieldAttributes attributes) {
+                       return null;
+               }
+
+               public FieldBuilder DefineUninitializedData( string name, int size, FieldAttributes attributes) {
+                       return null;
+               }
+
        }
 }
index 240739d65122e0b5939e00a57cf1766ffea8036d..8b1ec397e8c8807c3dcf0315523354c889135939 100644 (file)
@@ -181,12 +181,12 @@ namespace System.Reflection {
 
                public static Assembly Load(String assemblyString)
                {
-                       return null;
+                       return LoadFrom (assemblyString, new Evidence());
                }
                
                public static Assembly Load(String assemblyString, Evidence assemblySecurity)
                {
-                       return null;
+                       return LoadFrom (assemblyString, assemblySecurity);
                }
 
                public static Assembly Load(AssemblyName assemblyRef)
index 83ebc495832583898683764c38be70c4cb047e9c..0537ecc6ceafb060d20c901975723ef4920cfac9 100644 (file)
@@ -1,3 +1,12 @@
+\r
+Wed Nov 14 16:53:28 CET 2001 Paolo Molaro <lupus@ximian.com>\r
+\r
+       * Assembly.cs: implement some of the Load() methods.\r
+       * ConstructorInfo.cs: some missing stubs and fields.\r
+       * FieldInfo.cs: IsInitOnly property.\r
+       * ParameterInfo.cs: stubs for missing properties.\r
+       * ParameterModifier.cs: implemented class.\r
+\r
 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>\r
 \r
        * Assembly.cs: Filled in some stub implementations\r
index 1b72237b89777e558d1ff0671001a6cbf874a01f..41f566ab5b46965625addf24228d405d99a56bf2 100644 (file)
@@ -9,9 +9,16 @@
 
 using System;
 using System.Reflection;
+using System.Globalization;
 
 namespace System.Reflection {
        public abstract class ConstructorInfo : MethodBase {
+               public static readonly string ConstructorName = ".ctor";
+               public static readonly string TypeConstructorName = ".cctor";
+
+               protected ConstructorInfo() {
+               }
+               
                public override MemberTypes MemberType {
                        get {return MemberTypes.Constructor;}
                }
@@ -21,5 +28,8 @@ namespace System.Reflection {
                        //FIXME
                        return null;
                }
+
+               public abstract object Invoke( BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture);
+
        }
 }
index 6404e5331c7e37e777c8d82a13c567cc25f2c40b..3c82f8912fd3e13da37841afe6b455ea55876b26 100755 (executable)
@@ -36,6 +36,8 @@ namespace System.Reflection {
                // FIXME
                public bool IsStatic { get { return false; } }
 
+               public bool IsInitOnly {get { return false; } }
+
                public virtual void SetValue( object obj, object val, BindingFlags invokeAttr, Binder binder, CultureInfo culture) {
                }
                public void SetValue( object obj, object value) {
index 3c13c146d92d609f59574fb344603d03cd47fd58..c74b0d971f6a09533d56c6cf9c85bdd2aaa3339c 100644 (file)
@@ -8,6 +8,29 @@ namespace System.Reflection
 {
        public class ParameterInfo
        {
+
+               public virtual Type ParameterType {
+                       get {return null;}
+               }
+               public virtual ParameterAttributes Attributes {get{return(ParameterAttributes)0;}}
+               public virtual object DefaultValue {get{return null;}}
+
+               public bool IsIn {get{return false;}}
+
+               public bool IsLcid {get{return false;}}
+
+               public bool IsOptional {get{return false;}}
+
+               public bool IsOut {get{return false;}}
+
+               public bool IsRetval {get{return false;}}
+
+               public virtual MemberInfo Member {get{return null;}}
+
+               public virtual string Name {get{return null;}}
+
+               public virtual int Position {get{return 0;}}
+
                public virtual object[] GetCustomAttributes (bool inherit)
                {
                        // FIXME
diff --git a/mcs/class/corlib/System.Reflection/ParameterModifier.cs b/mcs/class/corlib/System.Reflection/ParameterModifier.cs
new file mode 100755 (executable)
index 0000000..4615e19
--- /dev/null
@@ -0,0 +1,26 @@
+//
+// System.Reflection/ParameterModifier.cs
+//
+// Author:
+// Paolo Molaro (lupus@ximian.com)
+//
+// Copyright (c) 2001 Ximian, Inc
+
+using System;
+
+namespace System.Reflection {
+       public struct ParameterModifier {
+               private bool[] data;
+               
+               public ParameterModifier (int paramaterCount) {
+                       data = new bool [paramaterCount];
+               }
+
+               public bool this [int index] {
+                       get {return data [index];} 
+                       set {data [index] = value;}
+               }
+
+       }
+
+}
index 4d9e6f311f25ddc550216727372ca2673f4d1e2a..7f2c24d2b0ce8705e513c94496d24feefaf529ef 100644 (file)
@@ -17,6 +17,10 @@ namespace System.Runtime.InteropServices {
        /// </summary>
        public enum CallingConvention {
 
+               /// <summary>
+               /// </summary>
+               Winapi = 1,
+
                /// <summary>
                /// </summary>
                Cdecl = 2,
index c8397e767eb1c3dfd3f38ecb22e13ffc2f970796..47a57b4ab2e1756093e73474388a54833b758d18 100644 (file)
@@ -1,3 +1,8 @@
+\r
+Wed Nov 14 17:02:57 CET 2001 Paolo Molaro <lupus@ximian.com>\r
+\r
+       * CallingConvention.cs: add missing Winapi.\r
+\r
 2001-07-20  Miguel de Icaza  <miguel@ximian.com>\r
 \r
        * OutAttribute.cs: New file.\r
index dd4b2b1168faaeff47b3039c62aab7a6c55ea394..56554b1a366fcd2dc260f1d1b810dec8dfab890e 100644 (file)
@@ -1,4 +1,8 @@
 
+Wed Nov 14 17:03:30 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * IFormatterConverter.cs, SerializationInfo.cs: CLSCompliant updates.
+
 Fri Nov 2 18:40:12 CET 2001 Paolo Molaro <lupus@ximian.com>
 
        * SerializationException.cs: implemented.
index 190b379a33c58d6a8b509a37518aaee61191e2cc..b902ec339a5c669d4eb09209bc63bac0ed3b042e 100644 (file)
@@ -9,6 +9,7 @@
 //
 
 namespace System.Runtime.Serialization {
+       [CLSCompliant(false)]
        public interface IFormatterConverter {
                object Convert (object o, Type t);
                object Convert (object o, TypeCode tc);
index a1096d267ddfe6f59739012112b22996914e2eae..4b117a8f938d7701325fc3db630a6ed2ad634445 100644 (file)
@@ -13,8 +13,9 @@ namespace System.Runtime.Serialization {
 
        public sealed class SerializationInfo {
                Type type;
-               IFormatterConverter converter;
+               [CLSCompliant(false)] IFormatterConverter converter;
                
+               [CLSCompliant(false)]
                public SerializationInfo (Type type, IFormatterConverter converter)
                {
                        this.type = type;
@@ -48,19 +49,24 @@ namespace System.Runtime.Serialization {
 
                //Public Instance Methods
 #region TODO: Implement these
+               [CLSCompliant(false)]
                public void AddValue(string name, short value){}
+               [CLSCompliant(false)]
            public void AddValue(string name, UInt16 value){}
            public void AddValue(string name, int value){}
            public void AddValue(string name, byte value){}
            public void AddValue(string name, bool value){}
            public void AddValue(string name, char value){}
+           [CLSCompliant(false)]
            public void AddValue(string name, SByte value){}
            public void AddValue(string name, double value){}
            public void AddValue(string name, Decimal value){}
            public void AddValue(string name, DateTime value){}
            public void AddValue(string name, float value){}
+           [CLSCompliant(false)]
            public void AddValue(string name, UInt32 value){}
            public void AddValue(string name, long value){}
+           [CLSCompliant(false)]
            public void AddValue(string name, UInt64 value){}
            public void AddValue(string name, object value){}
            public void AddValue(string name, object value, Type type){}
@@ -74,11 +80,15 @@ namespace System.Runtime.Serialization {
            public short GetInt16(string name){return 0;}
            public int GetInt32(string name){return 0;}
            public long GetInt64(string name){return 0;}
+           [CLSCompliant(false)]
            public SByte GetSByte(string name){return new SByte();}
            public float GetSingle(string name){return 0;}
            public string GetString(string name){return "";}
+           [CLSCompliant(false)]
            public UInt16 GetUInt16(string name){return 0;}
+           [CLSCompliant(false)]
            public UInt32 GetUInt32(string name){return 0;}
+           [CLSCompliant(false)]
            public UInt64 GetUInt64(string name){return 0;}
            public object GetValue(string name, Type type){return null;}
                public void SetType(Type type){}
index 905be24e2f98c8eabe4414d6feb1117046287bff..84a84beffbe2a2b8ee82203873fd2f88585e3af3 100644 (file)
@@ -1,3 +1,9 @@
+
+Wed Nov 14 17:04:30 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * MD5CryptoServiceProvider.cs, SHA1CryptoServiceProvider.cs,
+       SHA256Managed.cs: CLSCompliant updates.
+
 2001-10-11  Thomas Neidhart <tome@sbox.tugraz.at>
 
        * CryptoAPITransform.cs: Initial version
index 5d8d8f2d1f4f1ce0fc6d30d911154dfbe635153b..6a9dca05e25161df3a12b194e940459d4615ca7c 100644 (file)
@@ -19,8 +19,8 @@ namespace System.Security.Cryptography {
                private const int BLOCK_SIZE_BYTES =  64;\r
                private const int HASH_SIZE_BYTES  =  16;\r
                private const int HASH_SIZE_BITS   = 128;\r
-               protected uint[] _H;\r
-               protected uint count;\r
+               [CLSCompliant(false)] protected uint[] _H;\r
+               [CLSCompliant(false)] protected uint count;\r
                private byte[] _ProcessingBuffer;   // Used to start data when passed less than a block worth.\r
                private int _ProcessingBufferCount; // Counts how much data we have stored that still needs processed.\r
        \r
index 4d84f6f0da66358b975a3fe66dbeda550f3ed4d0..fe84262080f5ee3607204b3cbc806664176449c3 100644 (file)
@@ -20,8 +20,8 @@ namespace System.Security.Cryptography {
                private const int BLOCK_SIZE_BYTES =  64;\r
                private const int HASH_SIZE_BYTES  =  20;\r
                private const int HASH_SIZE_BITS   = 160;\r
-               protected uint[] _H;  // these are my chaining variables\r
-               protected uint count;\r
+               [CLSCompliant(false)] protected uint[] _H;  // these are my chaining variables\r
+               [CLSCompliant(false)] protected uint count;\r
                private byte[] _ProcessingBuffer;   // Used to start data when passed less than a block worth.\r
                private int _ProcessingBufferCount; // Counts how much data we have stored that still needs processed.\r
        \r
index 8f71227b27256f6eea8d5cfeb0a7973812c5b920..bcfd16b34798702de3ab14c80fb125d70a16bbcc 100644 (file)
@@ -20,9 +20,9 @@ namespace System.Security.Cryptography {
                private const int BLOCK_SIZE_BYTES =  64;\r
                private const int HASH_SIZE_BYTES  =  32;\r
                private const int HASH_SIZE_BITS   = 256;\r
-               protected uint[] _H;\r
-               private uint[] K;\r
-               protected uint count;\r
+               [CLSCompliant(false)] protected uint[] _H;\r
+               [CLSCompliant(false)] private uint[] K;\r
+               [CLSCompliant(false)] protected uint count;\r
                private byte[] _ProcessingBuffer;   // Used to start data when passed less than a block worth.\r
                private int _ProcessingBufferCount; // Counts how much data we have stored that still needs processed.\r
        \r
index 271221a6466debda17f44bedfc42c010d3eb2af0..9f2c21f7b80af8e39653c887609ec22de906e403 100755 (executable)
@@ -1,3 +1,9 @@
+
+Wed Nov 14 17:05:22 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * Encoding.cs: renamed some fields.
+       * StringBuilder.cs: CLSCompliant updates.
+
 2001-10-29  Nick Drochak  <ndrochak@gol.com>
 
        * StringBuilder.cs: Throw exceptions when constructor paramter(s) are
index 3423086138fdb34dcf81917cdc6e7cd5c0e789cc..9d6e6f06c1769a84853aed9451aeb8c0c359da03 100755 (executable)
@@ -19,16 +19,16 @@ namespace System.Text {
                 private static UTF7Encoding utf7Encoding;
                 private static UTF8Encoding utf8Encoding;
 
-                private int codepage;
-                protected string bodyName;
-                protected string encodingName;
-                protected string headerName;
+                private int m_codepage;
+                protected string m_bodyName;
+                protected string m_encodingName;
+                protected string m_headerName;
 
                 protected Encoding() {
                 }
 
                 protected Encoding(int codepage) {
-                        this.codepage = codepage;
+                        this.m_codepage = codepage;
                 }
 
                 public static Encoding ASCII {
@@ -49,13 +49,13 @@ namespace System.Text {
 
                 public virtual string BodyName {
                         get {
-                                return bodyName;
+                                return m_bodyName;
                         }
                 }
 
                 public virtual int CodePage {
                         get {
-                                return codepage;
+                                return m_codepage;
                         }
                 }
 
@@ -67,13 +67,13 @@ namespace System.Text {
 
                 public virtual string EncodingName {
                         get {
-                                return encodingName;
+                                return m_encodingName;
                         }
                 }
 
                 public virtual string HeaderName {
                         get {
-                                return headerName;
+                                return m_headerName;
                         }
                 }
 
index 35920c49c624db0446ad9a3b295f9dcc0b0166b9..ac569038260e84e74dc73936885291a9400cf7d3 100644 (file)
@@ -385,6 +385,7 @@ namespace System.Text {
                        return Append( value.ToString().ToCharArray() );\r
                }\r
 \r
+               [CLSCompliant(false)]\r
                public StringBuilder Append( sbyte value ) {\r
                        return Append( value.ToString().ToCharArray() );\r
                }\r
@@ -393,14 +394,17 @@ namespace System.Text {
                        return Append( value.ToString().ToCharArray() );\r
                }\r
 \r
+               [CLSCompliant(false)]\r
                public StringBuilder Append( ushort value ) {\r
                        return Append( value.ToString().ToCharArray() );\r
                }       \r
                \r
+               [CLSCompliant(false)]\r
                public StringBuilder Append( uint value ) {\r
                        return Append( value.ToString().ToCharArray() );\r
                }\r
 \r
+               [CLSCompliant(false)]\r
                public StringBuilder Append( ulong value ) {\r
                        return Append( value.ToString().ToCharArray() );\r
                }\r
@@ -544,7 +548,8 @@ namespace System.Text {
                public StringBuilder Insert( int index, object value ) {\r
                        return Insert( index, value.ToString().ToCharArray() );\r
                }\r
-\r
+               \r
+               [CLSCompliant(false)]\r
                public StringBuilder Insert( int index, sbyte value ) {\r
                        return Insert( index, value.ToString().ToCharArray() );\r
                }\r
@@ -553,14 +558,17 @@ namespace System.Text {
                        return Insert( index, value.ToString().ToCharArray() );\r
                }\r
 \r
+               [CLSCompliant(false)]\r
                public StringBuilder Insert( int index, ushort value ) {\r
                        return Insert( index, value.ToString().ToCharArray() );\r
                }\r
 \r
+               [CLSCompliant(false)]\r
                public StringBuilder Insert( int index, uint value ) {\r
                        return Insert( index, value.ToString().ToCharArray() );\r
                }\r
-\r
+               \r
+               [CLSCompliant(false)]\r
                public StringBuilder Insert( int index, ulong value ) {\r
                        return Insert( index, value.ToString().ToCharArray() );\r
                }\r
index 3d9dc4b9b99125baada9d3e320e057d86afdd48f..60c510cefa3d7fb943e6b5b06fb524d11f81424a 100644 (file)
@@ -1,3 +1,8 @@
+
+Wed Nov 14 17:06:18 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * Overlapped.cs, ThreadPool.cs, Timer.cs: CLSCompliant updates.
+
 2001-10-03  Dick Porter  <dick@ximian.com>
 
        * Monitor.cs: Implemented all methods except the two Wait()
index d9963ca228bc489df7159802f8dded7e44438bbc..2cab00f17f0e75a93e29ab08ef2b4500fa0b9b46 100755 (executable)
@@ -12,10 +12,12 @@ namespace System.Threading
 {
        public class Overlapped
        {
+               [CLSCompliant(false)]
                unsafe public static void Free(NativeOverlapped *nativeOverlappedPtr) {
                        // FIXME
                }
 
+               [CLSCompliant(false)]
                unsafe public static Overlapped Unpack(NativeOverlapped *nativeOverlappedPtr) {
                        // FIXME
                        return(new Overlapped());
@@ -69,11 +71,13 @@ namespace System.Threading
                        }
                }
 
+               [CLSCompliant(false)]
                unsafe public NativeOverlapped *Pack(IOCompletionCallback iocb) {
                        // FIXME
                        return(null);
                }
                
+               [CLSCompliant(false)]
                unsafe public NativeOverlapped *UnsafePack(IOCompletionCallback iocb) {
                        // FIXME
                        return(null);
index 31b99d2271a1cf301b0be6d2a49713221210798e..6bf67d9bf91f29371f21fba5f20e087539c7405d 100755 (executable)
@@ -55,6 +55,7 @@ namespace System.Threading
                        return(null);
                }
 
+               [CLSCompliant(false)]
                public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) {
                        // FIXME
                        return(null);
@@ -80,6 +81,7 @@ namespace System.Threading
                        return(null);
                }
 
+               [CLSCompliant(false)]
                public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) {
                        // FIXME
                        return(null);
index 6c056bf98bd68f7d75f36a9bcc59c92101701e1e..4acdbe82b4d039c2298690a54f7a390ca4a0005c 100755 (executable)
@@ -43,6 +43,7 @@ namespace System.Threading
                        // FIXME
                }
 
+               [CLSCompliant(false)]
                public Timer(TimerCallback callback, object state, uint dueTime, uint period) {
                        // FIXME
                }
@@ -80,6 +81,7 @@ namespace System.Threading
                        return(false);
                }
 
+               [CLSCompliant(false)]
                public bool Change(uint dueTime, uint period) {
                        // FIXME
                        return(false);
index 6b179c3be51d51275f87d7502388ef071b06009d..43067ae463c35f1d35bf9f51f8964187046f54b1 100755 (executable)
@@ -14,7 +14,7 @@ using System.Reflection.Emit;
 using System.Runtime.CompilerServices;
 
 namespace System {
-       public interface _AppDomain {
+       public interface AppDomain_Intf {
        }
        public sealed class AppDomain /* : MarshalByRefObject , _AppDomain, IEvidenceFactory */ {
 
index 5d5cc175a89c79d4fde85d2dd48b571049b0a1e2..e5da836c3d6052c0ba1f3407012226a6c22e5de3 100644 (file)
@@ -333,9 +333,9 @@ namespace System
 
                        for (int i = 0; i < length; i++) 
                        {
-                               int index = source.GetLowerBound (0) + i;
+                               int index = source.GetLowerBound (0) + i + source_idx;
 
-                               dest.SetValue(source.GetValue(index), index);
+                               dest.SetValue(source.GetValue(index), dest_idx + i + dest.GetLowerBound (0));
                        }
                        
                }
index c56eae77eef4fe5e4563dc394e7d94ff74eb5519..8857ac303686af4bfa9948201d9543a2b462a446 100755 (executable)
@@ -14,18 +14,18 @@ namespace System
 {
        public class AssemblyLoadEventArgs: EventArgs
        {
-               protected Assembly loadedAssembly;
+               protected Assembly m_loadedAssembly;
 
                public AssemblyLoadEventArgs(Assembly loadedAssembly)
                {
-                       this.loadedAssembly = loadedAssembly;
+                       this.m_loadedAssembly = loadedAssembly;
                }
 
                public Assembly LoadedAssembly
                {
                        get 
                        {
-                               return loadedAssembly;
+                               return m_loadedAssembly;
                        }
                }
        }
index ed7747456c1048fab89a83e5e8091c8eb2cb0a37..8dbd5ad44459695ab0759efeea3516442327f897 100755 (executable)
@@ -16,11 +16,11 @@ namespace System {
        /// <remarks>
        /// </remarks>
        [AttributeUsage(AttributeTargets.All)]
-       public class CLSCompliant: Attribute {
+       public class CLSCompliantAttribute : Attribute {
 
                bool is_compliant;
 
-               public CLSCompliant(bool is_compliant)
+               public CLSCompliantAttribute (bool is_compliant)
                {
                        this.is_compliant = is_compliant;
                }
index 3f39b6404cc5de9d427202704785b3f4d89ced22..83fab8db9d1bd2f32a646615b0d897b38a52ae5e 100644 (file)
@@ -1,3 +1,22 @@
+
+Wed Nov 14 16:31:19 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+       * AppDomain.cs: rename dummy interface _AppDomain to AppDomain_Intf.
+       * Array.cs: fix Array.Copy.
+       * AssemblyLoadEventArgs.cs: rename field.
+       * CLSCompliantAttribute.cs: use correct name for the class.
+       * Char.cs: fix IsLetter.
+       * Console.cs, DateTime.cs, Decimal.cs, IConvertible.cs, Math.cs,
+       SByte.cs, UInt16.cs, UInt32.cs, UInt64.cs, UIntPtr.cs: CLSCompliant updates.
+       * Convert.cs: CLSCompliant updates, add ChangeType() methods.
+       * Delegate.cs: renamed target field to m_target.
+       * Enum.cs: added missing methods.
+       * MonoType.cs: add a constructor and some needed properties.
+       * Object.cs: implement GetType().
+       * String.cs: CLSCompliant updates. Fixes everywhere to remove the
+       ending 0 char.
+       * Type.cs: add missing methods/properties.
+
 2001-11-10  Sean MacIsaac  <macisaac@ximian.com>
 
        * AttributeUseage.cs: Should define AttributeUsageAttribute.
index f2b6ab6447443b498e2a16d6a011954b9233e268..5f9dea72347a13902e603256a08f384b7541c3bc 100644 (file)
@@ -121,7 +121,7 @@ namespace System {
                public static bool IsLetter (char c)
                {
                        // TODO: Make me Unicode aware
-                       return ((c >= 65) && (c <= 126));
+                       return (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')));
                }
 
                public static bool IsLetter (string str, int index)
index 9742be87c8ca853dbaea75a426a01e9d2623b165..f8faa8d6ef7be93a64f4337e0ebdf8bf6b7eee5b 100644 (file)
@@ -152,11 +152,13 @@ namespace System {
                        stdout.Write (value);
                }
                
+               [CLSCompliant(false)]
                 public static void Write (uint value)
                {
                        stdout.Write (value);
                }
                
+               [CLSCompliant(false)]
                 public static void Write (ulong value)
                {
                        stdout.Write (value);
@@ -252,12 +254,14 @@ namespace System {
                        stdout.WriteLine();
                }
                
+               [CLSCompliant(false)]
                 public static void WriteLine (uint value)
                {
                        stdout.Write (value);
                        stdout.WriteLine();
                }
                
+               [CLSCompliant(false)]
                 public static void WriteLine (ulong value)
                {
                        stdout.Write (value);
index 79b03cc51a065a124ba98ed7d394321d3c3b5463..e0104a6da15e2810dee00b95d4d6be07e8a959fb 100644 (file)
@@ -71,6 +71,7 @@ using System.Security.Cryptography;
 \r
 namespace System {\r
   \r
+       [CLSCompliant(false)]\r
        public sealed class Convert {\r
        \r
                // ========== BASE 64 Conversions ========== //\r
@@ -1590,6 +1591,19 @@ namespace System {
                }\r
 \r
                // ========== Conversion / Helper Fucntions ========== //\r
+\r
+               public static object ChangeType( object value, Type conversionType) {\r
+                       return null;\r
+               }\r
+               public static object ChangeType( object value, TypeCode typeCode) {\r
+                       return null;\r
+               }\r
+               public static object ChangeType( object value, Type conversionType, IFormatProvider provider) {\r
+                       return null;\r
+               }\r
+               public static object ChangeType( object value, TypeCode typeCode, IFormatProvider provider) {\r
+                       return null;\r
+               }\r
        \r
                // Lookup table for the conversion ToType method. Order\r
                // is important! Used by ToType for comparing the target\r
index 7182a3f485e7fba10bdb116bda62fddaed390682..5d9688698e40aeb9e54aa20260dfa2cc9bb3e969 100644 (file)
@@ -679,6 +679,7 @@ namespace System
                        throw new InvalidCastException();\r
                }\r
 \r
+               [CLSCompliant(false)]\r
                public SByte ToSByte(IFormatProvider provider)\r
                {\r
                        throw new InvalidCastException();\r
@@ -698,12 +699,14 @@ namespace System
                {\r
                        throw new InvalidCastException();\r
                }\r
-\r
+               \r
+               [CLSCompliant(false)]\r
                public UInt32 ToUInt32(IFormatProvider provider)\r
                {\r
                        throw new InvalidCastException();\r
                }\r
 \r
+               [CLSCompliant(false)]\r
                public UInt64 ToUInt64(IFormatProvider provider)\r
                {\r
                        throw new InvalidCastException();\r
index 74cfaeab7f242fcadb71965f1c5c0b81ceab7f0e..606331110665b2a1dbd79c533b58483a16cd3e86 100644 (file)
@@ -273,6 +273,7 @@ namespace System
             return (byte) result;\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static explicit operator sbyte(Decimal val) \r
         {\r
             long result;\r
@@ -324,6 +325,7 @@ namespace System
             return (short) result;\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static explicit operator ushort(Decimal val) \r
         {\r
             ulong result;\r
@@ -358,6 +360,7 @@ namespace System
             return (int) result;\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static explicit operator uint(Decimal val) \r
         {\r
             ulong result;\r
@@ -387,6 +390,7 @@ namespace System
             return result;\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static explicit operator ulong(Decimal val) \r
         {\r
             ulong result;\r
@@ -404,6 +408,7 @@ namespace System
             return new Decimal(val);\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static implicit operator Decimal(sbyte val) \r
         {\r
             return new Decimal(val);\r
@@ -414,6 +419,7 @@ namespace System
             return new Decimal(val);\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static implicit operator Decimal(ushort val) \r
         {\r
             return new Decimal(val);\r
@@ -429,6 +435,7 @@ namespace System
             return new Decimal(val);\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static implicit operator Decimal(uint val) \r
         {\r
             return new Decimal(val);\r
@@ -439,6 +446,7 @@ namespace System
             return new Decimal(val);\r
         }\r
 \r
+       [CLSCompliant(false)]\r
         public static implicit operator Decimal(ulong val) \r
         {\r
             return new Decimal(val);\r
index 2143468f3b62f2f33ae5ebeea4e899c43eb68138..a2a05bd1bbba7c2d93d6d1d436e460fa55b9bff0 100644 (file)
@@ -16,7 +16,7 @@ namespace System {
 
        public abstract class Delegate : ICloneable, ISerializable {
                protected Type target_type;
-               protected object target;
+               protected object m_target;
                protected string method;
                protected IntPtr method_ptr;
 
@@ -30,13 +30,13 @@ namespace System {
 
                        this.target_type = null;
                        this.method_ptr = IntPtr.Zero;
-                       this.target = target;
+                       this.m_target = target;
                        this.method = method;
                }
 
                protected Delegate (Type target_type, string method)
                {
-                       if (target == null)
+                       if (m_target == null)
                                throw new ArgumentNullException ("Target type is null");
 
                        if (method == null)
@@ -44,7 +44,7 @@ namespace System {
 
                        this.target_type = target_type;
                        this.method_ptr = IntPtr.Zero;
-                       this.target = null;
+                       this.m_target = null;
                        this.method = method;
                }
 
@@ -58,7 +58,7 @@ namespace System {
 
                public object Target {
                        get {
-                               return target;
+                               return m_target;
                        }
                }
 
@@ -77,7 +77,7 @@ namespace System {
                        Delegate d = (Delegate) o;
                        
                        if ((d.target_type == target_type) &&
-                           (d.target == target) &&
+                           (d.m_target == m_target) &&
                            (d.method == method))
                                return true;
 
index 1755052922cae15a3ab030a391a55d7056d43475..25b89f691d290e79832359c4d20ad19232672d76 100644 (file)
@@ -17,6 +17,19 @@ namespace System {
                {
                        return false;
                }
+               public override string ToString() {
+                       return null;
+               }
+               public string ToString( IFormatProvider provider) {
+                       return null;
+               }
+               public string ToString(String format) {
+                       return null;
+               }
+               public string ToString(String format, IFormatProvider provider) {
+                       return null;
+               }
+
        }
 
 }
index 62fd3d5b942984efcc931ec23f1c3f0bdb0aab27..95612b04c212d305d9aaf270e71e68f65709764d 100644 (file)
@@ -30,6 +30,7 @@
 
 namespace System {
 
+    [CLSCompliant(false)]
     public interface IConvertible {
        
        TypeCode GetTypeCode ();
index 47a27d3ca3871f5119349e4f0e3850451aac7b5c..5b2558de88ca0221b24f615df964f8d2d406bc7a 100644 (file)
@@ -13,6 +13,7 @@ using System.PAL;
 
 namespace System
 {
+       [CLSCompliant(false)]
         public sealed class Math
         {
                 public const double E = 2.7182818284590452354;
index 4ed35ac933f3ed5e58bf33e84f6f8f59c0137b2a..cfaf8bd384aa680014ab41eb467bd76b586318c1 100644 (file)
@@ -11,6 +11,14 @@ namespace System
 {
        internal class MonoType : Type
        {
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               private static extern void type_from_obj (MonoType type, Object obj);
+               
+               internal MonoType (Object obj) {
+                       type_from_obj (this, obj);
+               }
+
                public override Type[] GetInterfaces()
                {
                        return null;
@@ -76,6 +84,18 @@ namespace System
                        }
                }
 
+               public override string Namespace {
+                       get {
+                               return null;
+                       }
+               }
+
+               public override Module Module {
+                       get {
+                               return null;
+                       }
+               }
+
                public override Type ReflectedType {
                        get {
                                return null;
index b0e7b82e5cbbdfe8761c804d5edad37867dcd6b4..cb112d103818cefc6a68764e39676ecf0bdc0317 100644 (file)
@@ -77,9 +77,7 @@ namespace System {
                        // TODO: This probably needs to be tied up
                        // with the Type system.  Private communications
                        // channel? 
-                       // Type is abstract, so the following line won't cut it.
-                       //return new Type ();
-                       return null;
+                       return new MonoType (this);
                }
 
                // <summary>
index 10827e5b4957a78a2da85c6431946f813f5d57ed..1b850796e884c6d172af4f3f65d15a0cb676a201 100644 (file)
@@ -10,7 +10,8 @@
 using System.Globalization;
 
 namespace System {
-       
+
+       [CLSCompliant(false)]
        public struct SByte : IComparable, IFormattable { //, IConvertible {
                public static Type Type = typeof (sbyte);
 
index 814b46ccc99012db70a84b82a3a7c79ac5267481..89f39ca84ccf7f1bfc05b7ddafb9d2aaec6b17d5 100644 (file)
@@ -35,6 +35,7 @@ namespace System {
                private int length;
 
                // Constructors
+               [CLSCompliant(false)]
                unsafe public String (char *value)
                {
                        int i;
@@ -63,6 +64,7 @@ namespace System {
                                this.c_str[i] = value[i];
                }
 
+               [CLSCompliant(false)]
                unsafe public String (sbyte *value)
                {
                        // FIXME: consider unicode?
@@ -91,6 +93,7 @@ namespace System {
                                this.c_str[i] = c;
                }
 
+               [CLSCompliant(false)]
                unsafe public String (char *value, int startIndex, int length)
                {
                        int i;
@@ -123,6 +126,7 @@ namespace System {
                                this.c_str[i] = value[startIndex + i];
                }
 
+               [CLSCompliant(false)]
                unsafe public String (sbyte *value, int startIndex, int length)
                {
                        // FIXME: consider unicode?
@@ -140,6 +144,7 @@ namespace System {
                                this.c_str[i] = (char) *(value + startIndex + i);
                }
 
+               [CLSCompliant(false)]
                unsafe public String (sbyte *value, int startIndex, int length, Encoding enc)
                {
                        // FIXME: implement me
@@ -483,12 +488,11 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       str = new char [len + 1];
+                       str = new char [len];
                        i = 0;
                        for (int j = 0; j < strings.Length; j++)
                                for (int k = 0; k < strings[j].Length; k++)
                                        str[i++] = strings[j][k];
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -508,7 +512,7 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       str = new char [len + 1];
+                       str = new char [len];
                        i = 0;
                        foreach (string value in values) {
                                if (value == null)
@@ -517,7 +521,6 @@ namespace System {
                                for (int j = 0; j < value.Length; j++)
                                        str[i++] = value[j];
                        }
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -544,12 +547,11 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       concat = new char [len + 1];
+                       concat = new char [len];
                        for (i = 0; i < str0.Length; i++)
                                concat[i] = str0[i];
                        for (j = 0 ; j < str1.Length; j++)
                                concat[i + j] = str1[j];
-                       concat[len] = '\0';
 
                        return new String (concat);
                }
@@ -579,14 +581,13 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       concat = new char [len + 1];
+                       concat = new char [len];
                        for (i = 0; i < str0.Length; i++)
                                concat[i] = str0[i];
                        for (j = 0; j < str1.Length; j++)
                                concat[i + j] = str1[j];
                        for (k = 0; k < str2.Length; k++)
                                concat[i + j + k] = str2[k];
-                       concat[len] = '\0';
 
                        return new String (concat);
                }
@@ -609,7 +610,7 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       concat = new char [len + 1];
+                       concat = new char [len];
                        for (i = 0; i < str0.Length; i++)
                                concat[i] = str0[i];
                        for (j = 0; j < str1.Length; j++)
@@ -618,7 +619,6 @@ namespace System {
                                concat[i + j + k] = str2[k];
                        for (l = 0; l < str3.Length; l++)
                                concat[i + j + k + l] = str3[l];
-                       concat[len] = '\0';
 
                        return new String (concat);
                }
@@ -854,14 +854,13 @@ namespace System {
                        if (startIndex < 0 || startIndex > this.length)
                                throw new ArgumentOutOfRangeException ();
 
-                       str = new char [value.Length + this.length + 1];
+                       str = new char [value.Length + this.length];
                        for (i = 0; i < startIndex; i++)
                                str[i] = this.c_str[i];
                        for (j = 0; j < value.Length; j++)
                                str[i + j] = value[j];
                        for ( ; i < this.length; i++)
                                str[i + j] = this.c_str[i];
-                       str[i + j] = '\0';
 
                        return new String (str);
                }
@@ -901,7 +900,7 @@ namespace System {
                        if (i == startIndex)
                                return String.Empty;
 
-                       str = new char [len + 1];
+                       str = new char [len];
                        for (i = 0; i < value[startIndex].Length; i++)
                                str[i] = value[startIndex][i];
 
@@ -914,7 +913,6 @@ namespace System {
                                for (k = 0; k < value[j].Length; k++)
                                        str[i++] = value[j][k];
                        }
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -1061,15 +1059,13 @@ namespace System {
                        if (totalWidth < 0)
                                throw new ArgumentException ();
 
-                       str = new char [totalWidth > this.length ? totalWidth : this.length + 1];
+                       str = new char [totalWidth > this.length ? totalWidth : this.length];
                        for (i = 0; i < totalWidth - this.length; i++)
                                str[i] = padChar;
 
                        for (j = 0; j < this.length; i++, j++)
                                str[i] = this.c_str[j];
 
-                       str[i] = '\0';
-
                        return new String (str);
                }
 
@@ -1086,15 +1082,13 @@ namespace System {
                        if (totalWidth < 0)
                                throw new ArgumentException ();
 
-                       str = new char [totalWidth > this.length ? totalWidth : this.length + 1];
+                       str = new char [totalWidth > this.length ? totalWidth : this.length];
                        for (i = 0; i < this.length; i++)
                                str[i] = this.c_str[i];
 
                        for ( ; i < str.Length; i++)
                                str[i] = padChar;
 
-                       str[i] = '\0';
-
                        return new String (str);
                }
 
@@ -1110,12 +1104,11 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       str = new char [len + 1];
+                       str = new char [len];
                        for (i = 0; i < startIndex; i++)
                                str[i] = this.c_str[i];
                        for (j = i + count; j < this.length; j++)
                                str[i++] = this.c_str[j];
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -1125,14 +1118,13 @@ namespace System {
                        char[] str;
                        int i;
 
-                       str = new char [this.length + 1];
+                       str = new char [this.length];
                        for (i = 0; i < this.length; i++) {
                                if (this.c_str[i] == oldChar)
                                        str[i] = newChar;
                                else
                                        str[i] = this.c_str[i];
                        }
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -1157,14 +1149,13 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       str = new char [len + 1];
+                       str = new char [len];
                        for (i = 0; i < index; i++)
                                str[i] = this.c_str[i];
                        for (j = 0; j < newValue.Length; j++)
                                str[i++] = newValue[j];
                        for (j = index + oldValue.Length; j < this.length; j++)
                                str[i++] = this.c_str[j];
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -1217,10 +1208,9 @@ namespace System {
                                        char[] str;
                                        int i;
 
-                                       str = new char [len + 1];
+                                       str = new char [len];
                                        for (i = 0; i < len; i++)
                                                str[i] = this.c_str[index + i];
-                                       str[i] = '\0';
 
                                        list.Add (new String (str));
                                }
@@ -1257,10 +1247,9 @@ namespace System {
                                        char[] str;
                                        int i;
 
-                                       str = new char [len + 1];
+                                       str = new char [len];
                                        for (i = 0; i < len; i++)
                                                str[i] = this.c_str[index + i];
-                                       str[i] = '\0';
 
                                        list.Add (new String (str));
                                }
@@ -1272,10 +1261,9 @@ namespace System {
                                char[] str;
                                int i;
 
-                               str = new char [this.length - index + 1];
+                               str = new char [this.length - index];
                                for (i = index; i < this.length; i++)
                                        str[i - index] = this.c_str[i];
-                               str[i - index] = '\0';
 
                                list.Add (new String (str));
                        }
@@ -1321,7 +1309,7 @@ namespace System {
                        if (len == 0)
                                return String.Empty;
 
-                       str = new char [len + 1];
+                       str = new char [len];
                        for (i = startIndex; i < this.length; i++)
                                str[i - startIndex] = this.c_str[i];
 
@@ -1339,10 +1327,9 @@ namespace System {
                        if (length == 0)
                                return String.Empty;
 
-                       str = new char [length + 1];
+                       str = new char [length];
                        for (i = startIndex; i < startIndex + length; i++)
                                str[i - startIndex] = this.c_str[i];
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -1378,12 +1365,10 @@ namespace System {
                        if (startIndex < 0 || length < 0 || startIndex + length > this.length)
                                throw new ArgumentOutOfRangeException ();
 
-                       chars = new char [length + 1];
+                       chars = new char [length];
                        for (i = startIndex; i < length; i++)
                                chars[i - startIndex] = this.c_str[i];
 
-                       chars[length] = '\0';
-
                        return chars;
                }
 
@@ -1429,10 +1414,9 @@ namespace System {
                        char[] str;
                        int i;
 
-                       str = new char [this.length + 1];
+                       str = new char [this.length];
                        for (i = 0; i < this.length; i++)
                                str[i] = Char.ToLower (this.c_str[i]);
-                       str[i] = '\0';
 
                        return new String (str);
                }
@@ -1443,6 +1427,7 @@ namespace System {
                        return null;
                }
 
+               [CLSCompliant(false)]
                public sbyte ToSByte (IFormatProvider provider)
                {
                        // FIXME: implement me
@@ -1472,18 +1457,21 @@ namespace System {
                        return null;
                }
 
+               [CLSCompliant(false)]
                public ushort ToUInt16 (IFormatProvider provider)
                {
                        // FIXME: implement me
                        return 0;
                }
 
+               [CLSCompliant(false)]
                public uint ToUInt32 (IFormatProvider provider)
                {
                        // FIXME: implement me
                        return 0;
                }
 
+               [CLSCompliant(false)]
                public ulong ToUInt64 (IFormatProvider provider)
                {
                        // FIXME: implement me
@@ -1495,10 +1483,9 @@ namespace System {
                        char[] str;
                        int i;
 
-                       str = new char [this.length + 1];
+                       str = new char [this.length];
                        for (i = 0; i < this.length; i++)
                                str[i] = Char.ToUpper (this.c_str[i]);
-                       str[i] = '\0';
 
                        return new String (str);
                }
index 9325a1c77e04a635525de4901c05e136395edad8..dab718e69c241306330494c13c00cb7db901755b 100644 (file)
@@ -202,6 +202,9 @@ namespace System {
                        }
                }
 
+               public abstract Module Module {get;}
+               public abstract string Namespace {get;}
+
                public MethodInfo[] GetMethods ()
                {
                        // FIXME
@@ -231,5 +234,18 @@ namespace System {
                        // FIXME
                        return null;
                }
+
+               public virtual MemberInfo[] FindMembers( MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria) {
+                       return null;
+               }
+
+               public static TypeCode GetTypeCode( Type type) {
+                       return TypeCode.Empty;
+               }
+
+               public override string ToString() {
+                       return null;
+               }
+
        }
 }
index 8c65397e2c4cb06a07fb2a2c5a2dc358937138cd..a94bb80854976bbad6d4e6f882a9b804c94f7264 100644 (file)
@@ -10,7 +10,8 @@
 using System.Globalization;
 
 namespace System {
-       
+
+       [CLSCompliant(false)]
        public struct UInt16 : IComparable, IFormattable { //, IConvertible {
                private static Type Type = typeof (ushort);
 
index 4ba5f6beff2aa7dfea88754e2203516023ada1d8..13e28f57a3db32f8b4876ea32ca1edb3c075b68d 100644 (file)
@@ -10,7 +10,8 @@
 using System.Globalization;
 
 namespace System {
-       
+
+       [CLSCompliant(false)]
        public struct UInt32 : IComparable, IFormattable { //, IConvertible {
                public static Type Type = typeof (uint);
 
index 7a399547a0aa2ff3bd1a2239d6af85150aff2cb2..d52ca8812174d782cee3a808776ade796222b671 100644 (file)
@@ -10,7 +10,8 @@
 using System.Globalization;
 
 namespace System {
-       
+
+       [CLSCompliant(false)]
        public struct UInt64 : IComparable, IFormattable { //, IConvertible {
                private static Type Type = typeof (ulong);
 
index a3fcc601fb74b91c4a69cebc68b243e8557ecb8f..e19b2d402114475d2a3eca239101a113ae0c3c77 100644 (file)
@@ -24,7 +24,7 @@ namespace System
 
 [
     StructLayout(LayoutKind.Auto),
-    CLSCompliant(true)
+    CLSCompliant(false)
 ]
 public unsafe struct UIntPtr : ISerializable
 {
index 7091a010adb14c30d0b32dc9278fe6b376db7f12..d8226e92f5a64a163097974f001c99e0b5bd1d6e 100755 (executable)
@@ -15,12 +15,12 @@ namespace System
        public class UnhandledExceptionEventArgs: EventArgs
        {
                protected object exception;
-               protected bool isTerminating;
+               protected bool m_isTerminating;
 
                public UnhandledExceptionEventArgs(object exception, bool isTerminating)
                {
                        this.exception = exception;
-                       this.isTerminating = isTerminating;
+                       this.m_isTerminating = isTerminating;
                }
 
                public object ExceptionObject
@@ -35,7 +35,7 @@ namespace System
                {
                        get
                        {
-                               return isTerminating;
+                               return m_isTerminating;
                        }
                }
        }
index 928713a63ccfa12810f81f98366d8d3af8cfe81a..078c84c18ab8f07b1b8970850982b756814219d1 100644 (file)
@@ -7,6 +7,7 @@ using System.Runtime.InteropServices;
 
 namespace System.Private {
 
+[CLSCompliant(false)]
 public struct stat {
        public uint st_dev;
        public uint st_mode;
@@ -27,12 +28,12 @@ public class Wrapper {
        public const int O_RDONLY             = 0x00000000;
        public const int O_WRONLY             = 0x00000001;
        public const int O_RDWR               = 0x00000002;
-       public const int O_CREAT              = 0x00000200;
-       public const int O_EXCL               = 0x00000800;
-       public const int O_NOCTTY             = 0x00008000;
-       public const int O_TRUNC              = 0x00000400;
-       public const int O_SYNC               = 0x00002000;
-       public const int O_APPEND             = 0x00000008;
+       public const int O_CREAT              = 0x00000040;
+       public const int O_EXCL               = 0x00000080;
+       public const int O_NOCTTY             = 0x00000100;
+       public const int O_TRUNC              = 0x00000200;
+       public const int O_SYNC               = 0x00001000;
+       public const int O_APPEND             = 0x00000400;
        public const int STDIN_FILENO         = 0x00000000;
        public const int STDOUT_FILENO        = 0x00000001;
        public const int STDERR_FILENO        = 0x00000002;
@@ -92,31 +93,31 @@ public class Wrapper {
        public const int EPIPE                = 32;
        public const int EDOM                 = 33;
        public const int ERANGE               = 34;
-       public const int EDEADLK              = 45;
-       public const int ENAMETOOLONG         = 91;
-       public const int ENOLCK               = 46;
-       public const int ENOSYS               = 88;
-       public const int ENOTEMPTY            = 90;
-       public const int ELOOP                = 92;
+       public const int EDEADLK              = 35;
+       public const int ENAMETOOLONG         = 36;
+       public const int ENOLCK               = 37;
+       public const int ENOSYS               = 38;
+       public const int ENOTEMPTY            = 39;
+       public const int ELOOP                = 40;
        public const int EWOULDBLOCK          = 11;
-       public const int ENOMSG               = 35;
-       public const int EIDRM                = 36;
-       public const int ECHRNG               = 37;
-       public const int EL2NSYNC             = 38;
-       public const int EL3HLT               = 39;
-       public const int EL3RST               = 40;
-       public const int ELNRNG               = 41;
-       public const int EUNATCH              = 42;
-       public const int ENOCSI               = 43;
-       public const int EL2HLT               = 44;
-       public const int EBADE                = 50;
-       public const int EBADR                = 51;
-       public const int EXFULL               = 52;
-       public const int ENOANO               = 53;
-       public const int EBADRQC              = 54;
-       public const int EBADSLT              = 55;
-       public const int EDEADLOCK            = 56;
-       public const int EBFONT               = 57;
+       public const int ENOMSG               = 42;
+       public const int EIDRM                = 43;
+       public const int ECHRNG               = 44;
+       public const int EL2NSYNC             = 45;
+       public const int EL3HLT               = 46;
+       public const int EL3RST               = 47;
+       public const int ELNRNG               = 48;
+       public const int EUNATCH              = 49;
+       public const int ENOCSI               = 50;
+       public const int EL2HLT               = 51;
+       public const int EBADE                = 52;
+       public const int EBADR                = 53;
+       public const int EXFULL               = 54;
+       public const int ENOANO               = 55;
+       public const int EBADRQC              = 56;
+       public const int EBADSLT              = 57;
+       public const int EDEADLOCK            = 35;
+       public const int EBFONT               = 59;
        public const int ENOSTR               = 60;
        public const int ENODATA              = 61;
        public const int ETIME                = 62;
@@ -129,49 +130,49 @@ public class Wrapper {
        public const int ESRMNT               = 69;
        public const int ECOMM                = 70;
        public const int EPROTO               = 71;
-       public const int EMULTIHOP            = 74;
-       public const int EDOTDOT              = 76;
-       public const int EBADMSG              = 77;
-       public const int ENOTUNIQ             = 80;
-       public const int EBADFD               = 81;
-       public const int EREMCHG              = 82;
-       public const int ELIBACC              = 83;
-       public const int ELIBBAD              = 84;
-       public const int ELIBSCN              = 85;
-       public const int ELIBMAX              = 86;
-       public const int ELIBEXEC             = 87;
-       public const int EUSERS               = 131;
-       public const int ENOTSOCK             = 108;
-       public const int EDESTADDRREQ         = 121;
-       public const int EMSGSIZE             = 122;
-       public const int EPROTOTYPE           = 107;
-       public const int ENOPROTOOPT          = 109;
-       public const int EPROTONOSUPPORT      = 123;
-       public const int ESOCKTNOSUPPORT      = 124;
+       public const int EMULTIHOP            = 72;
+       public const int EDOTDOT              = 73;
+       public const int EBADMSG              = 74;
+       public const int ENOTUNIQ             = 76;
+       public const int EBADFD               = 77;
+       public const int EREMCHG              = 78;
+       public const int ELIBACC              = 79;
+       public const int ELIBBAD              = 80;
+       public const int ELIBSCN              = 81;
+       public const int ELIBMAX              = 82;
+       public const int ELIBEXEC             = 83;
+       public const int EUSERS               = 87;
+       public const int ENOTSOCK             = 88;
+       public const int EDESTADDRREQ         = 89;
+       public const int EMSGSIZE             = 90;
+       public const int EPROTOTYPE           = 91;
+       public const int ENOPROTOOPT          = 92;
+       public const int EPROTONOSUPPORT      = 93;
+       public const int ESOCKTNOSUPPORT      = 94;
        public const int EOPNOTSUPP           = 95;
        public const int EPFNOSUPPORT         = 96;
-       public const int EAFNOSUPPORT         = 106;
-       public const int EADDRINUSE           = 112;
-       public const int EADDRNOTAVAIL        = 125;
-       public const int ENETDOWN             = 115;
-       public const int ENETUNREACH          = 114;
-       public const int ENETRESET            = 126;
-       public const int ECONNABORTED         = 113;
+       public const int EAFNOSUPPORT         = 97;
+       public const int EADDRINUSE           = 98;
+       public const int EADDRNOTAVAIL        = 99;
+       public const int ENETDOWN             = 100;
+       public const int ENETUNREACH          = 101;
+       public const int ENETRESET            = 102;
+       public const int ECONNABORTED         = 103;
        public const int ECONNRESET           = 104;
        public const int ENOBUFS              = 105;
-       public const int EISCONN              = 127;
-       public const int ENOTCONN             = 128;
-       public const int ESHUTDOWN            = 110;
-       public const int ETOOMANYREFS         = 129;
-       public const int ETIMEDOUT            = 116;
+       public const int EISCONN              = 106;
+       public const int ENOTCONN             = 107;
+       public const int ESHUTDOWN            = 108;
+       public const int ETOOMANYREFS         = 109;
+       public const int ETIMEDOUT            = 110;
        public const int ECONNREFUSED         = 111;
-       public const int EHOSTDOWN            = 117;
-       public const int EHOSTUNREACH         = 118;
-       public const int EALREADY             = 120;
-       public const int EINPROGRESS          = 119;
-       public const int ESTALE               = 133;
-       public const int EDQUOT               = 132;
-       public const int ENOMEDIUM            = 135;
+       public const int EHOSTDOWN            = 112;
+       public const int EHOSTUNREACH         = 113;
+       public const int EALREADY             = 114;
+       public const int EINPROGRESS          = 115;
+       public const int ESTALE               = 116;
+       public const int EDQUOT               = 122;
+       public const int ENOMEDIUM            = 123;
        public const int ENOTDIR              = 20;
 
 
@@ -179,12 +180,15 @@ public class Wrapper {
        public unsafe static extern long seek (IntPtr fd, long offset, int whence);
 
        [DllImport("monowrapper", EntryPoint="mono_wrapper_read", CharSet=CharSet.Ansi)]
+       [CLSCompliant(false)]
        public unsafe static extern int read (IntPtr fd, void * buf, int count);
 
        [DllImport("monowrapper", EntryPoint="mono_wrapper_write", CharSet=CharSet.Ansi)]
+       [CLSCompliant(false)]
        public unsafe static extern int write (IntPtr fd, void * buf, int count);
 
        [DllImport("monowrapper", EntryPoint="mono_wrapper_fstat", CharSet=CharSet.Ansi)]
+       [CLSCompliant(false)]
        public unsafe static extern int fstat (IntPtr fd, stat * buf);
 
        [DllImport("monowrapper", EntryPoint="mono_wrapper_ftruncate", CharSet=CharSet.Ansi)]
@@ -197,6 +201,7 @@ public class Wrapper {
        public unsafe static extern int close (IntPtr fd);
 
        [DllImport("monowrapper", EntryPoint="mono_wrapper_stat", CharSet=CharSet.Ansi)]
+       [CLSCompliant(false)]
        public unsafe static extern int stat (string path, stat * buf);
 
        [DllImport("monowrapper", EntryPoint="mono_wrapper_unlink", CharSet=CharSet.Ansi)]