* 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
+
+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
{\r
get\r
{\r
- return new char[] { '/', '\0' };\r
+ return new char[] { '\0' };\r
}\r
}\r
\r
}\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
+
+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.
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
// 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
_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;
+\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
+
+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
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)
{
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];
}
\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
// 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
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
+
+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.
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;
}
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;}
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";
+ }
+
}
}
--- /dev/null
+
+//
+// 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) {
+ }
+
+ }
+}
--- /dev/null
+
+//
+// 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 {
+ }*/
+}
--- /dev/null
+
+//
+// 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) {
+ }
+
+
+ }
+}
+
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 {
using System.Reflection.Emit;
using System.Globalization;
using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
public sealed class MethodBuilder : MethodInfo {
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;}}
if (ilgen != null)
ilgen.label_fixup ();
}
+
+ public void SetCustomAttribute( CustomAttributeBuilder customBuilder) {
+ }
+ public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute) {
+ }
+ public void SetImplementationFlags( MethodImplAttributes attributes) {
+ }
}
}
return DefineType (name, attr, parent, null);
}
+ public MethodInfo GetArrayMethod( Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
+ return null;
+ }
+
}
}
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 {
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 {
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;
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;}}
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) {
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;
+ }
+
}
}
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)
+\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
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;}
}
//FIXME
return null;
}
+
+ public abstract object Invoke( BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture);
+
}
}
// 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) {
{
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
--- /dev/null
+//
+// 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;}
+ }
+
+ }
+
+}
/// </summary>
public enum CallingConvention {
+ /// <summary>
+ /// </summary>
+ Winapi = 1,
+
/// <summary>
/// </summary>
Cdecl = 2,
+\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
+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.
//
namespace System.Runtime.Serialization {
+ [CLSCompliant(false)]
public interface IFormatterConverter {
object Convert (object o, Type t);
object Convert (object o, TypeCode tc);
public sealed class SerializationInfo {
Type type;
- IFormatterConverter converter;
+ [CLSCompliant(false)] IFormatterConverter converter;
+ [CLSCompliant(false)]
public SerializationInfo (Type type, IFormatterConverter converter)
{
this.type = type;
//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){}
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){}
+
+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
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
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
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
+
+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
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 {
public virtual string BodyName {
get {
- return bodyName;
+ return m_bodyName;
}
}
public virtual int CodePage {
get {
- return codepage;
+ return m_codepage;
}
}
public virtual string EncodingName {
get {
- return encodingName;
+ return m_encodingName;
}
}
public virtual string HeaderName {
get {
- return headerName;
+ return m_headerName;
}
}
return Append( value.ToString().ToCharArray() );\r
}\r
\r
+ [CLSCompliant(false)]\r
public StringBuilder Append( sbyte value ) {\r
return Append( value.ToString().ToCharArray() );\r
}\r
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
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
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
+
+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()
{
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());
}
}
+ [CLSCompliant(false)]
unsafe public NativeOverlapped *Pack(IOCompletionCallback iocb) {
// FIXME
return(null);
}
+ [CLSCompliant(false)]
unsafe public NativeOverlapped *UnsafePack(IOCompletionCallback iocb) {
// FIXME
return(null);
return(null);
}
+ [CLSCompliant(false)]
public static RegisteredWaitHandle RegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) {
// FIXME
return(null);
return(null);
}
+ [CLSCompliant(false)]
public static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject(WaitHandle waitObject, WaitOrTimerCallback callback, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce) {
// FIXME
return(null);
// FIXME
}
+ [CLSCompliant(false)]
public Timer(TimerCallback callback, object state, uint dueTime, uint period) {
// FIXME
}
return(false);
}
+ [CLSCompliant(false)]
public bool Change(uint dueTime, uint period) {
// FIXME
return(false);
using System.Runtime.CompilerServices;
namespace System {
- public interface _AppDomain {
+ public interface AppDomain_Intf {
}
public sealed class AppDomain /* : MarshalByRefObject , _AppDomain, IEvidenceFactory */ {
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));
}
}
{
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;
}
}
}
/// <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;
}
+
+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.
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)
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);
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);
\r
namespace System {\r
\r
+ [CLSCompliant(false)]\r
public sealed class Convert {\r
\r
// ========== BASE 64 Conversions ========== //\r
}\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
throw new InvalidCastException();\r
}\r
\r
+ [CLSCompliant(false)]\r
public SByte ToSByte(IFormatProvider provider)\r
{\r
throw new InvalidCastException();\r
{\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
return (byte) result;\r
}\r
\r
+ [CLSCompliant(false)]\r
public static explicit operator sbyte(Decimal val) \r
{\r
long result;\r
return (short) result;\r
}\r
\r
+ [CLSCompliant(false)]\r
public static explicit operator ushort(Decimal val) \r
{\r
ulong result;\r
return (int) result;\r
}\r
\r
+ [CLSCompliant(false)]\r
public static explicit operator uint(Decimal val) \r
{\r
ulong result;\r
return result;\r
}\r
\r
+ [CLSCompliant(false)]\r
public static explicit operator ulong(Decimal val) \r
{\r
ulong result;\r
return new Decimal(val);\r
}\r
\r
+ [CLSCompliant(false)]\r
public static implicit operator Decimal(sbyte val) \r
{\r
return new Decimal(val);\r
return new Decimal(val);\r
}\r
\r
+ [CLSCompliant(false)]\r
public static implicit operator Decimal(ushort val) \r
{\r
return new Decimal(val);\r
return new Decimal(val);\r
}\r
\r
+ [CLSCompliant(false)]\r
public static implicit operator Decimal(uint val) \r
{\r
return new Decimal(val);\r
return new Decimal(val);\r
}\r
\r
+ [CLSCompliant(false)]\r
public static implicit operator Decimal(ulong val) \r
{\r
return new Decimal(val);\r
public abstract class Delegate : ICloneable, ISerializable {
protected Type target_type;
- protected object target;
+ protected object m_target;
protected string method;
protected IntPtr method_ptr;
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)
this.target_type = target_type;
this.method_ptr = IntPtr.Zero;
- this.target = null;
+ this.m_target = null;
this.method = method;
}
public object Target {
get {
- return target;
+ return m_target;
}
}
Delegate d = (Delegate) o;
if ((d.target_type == target_type) &&
- (d.target == target) &&
+ (d.m_target == m_target) &&
(d.method == method))
return true;
{
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;
+ }
+
}
}
namespace System {
+ [CLSCompliant(false)]
public interface IConvertible {
TypeCode GetTypeCode ();
namespace System
{
+ [CLSCompliant(false)]
public sealed class Math
{
public const double E = 2.7182818284590452354;
{
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;
}
}
+ public override string Namespace {
+ get {
+ return null;
+ }
+ }
+
+ public override Module Module {
+ get {
+ return null;
+ }
+ }
+
public override Type ReflectedType {
get {
return null;
// 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>
using System.Globalization;
namespace System {
-
+
+ [CLSCompliant(false)]
public struct SByte : IComparable, IFormattable { //, IConvertible {
public static Type Type = typeof (sbyte);
private int length;
// Constructors
+ [CLSCompliant(false)]
unsafe public String (char *value)
{
int i;
this.c_str[i] = value[i];
}
+ [CLSCompliant(false)]
unsafe public String (sbyte *value)
{
// FIXME: consider unicode?
this.c_str[i] = c;
}
+ [CLSCompliant(false)]
unsafe public String (char *value, int startIndex, int length)
{
int i;
this.c_str[i] = value[startIndex + i];
}
+ [CLSCompliant(false)]
unsafe public String (sbyte *value, int startIndex, int length)
{
// FIXME: consider unicode?
this.c_str[i] = (char) *(value + startIndex + i);
}
+ [CLSCompliant(false)]
unsafe public String (sbyte *value, int startIndex, int length, Encoding enc)
{
// FIXME: implement me
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);
}
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)
for (int j = 0; j < value.Length; j++)
str[i++] = value[j];
}
- str[i] = '\0';
return new String (str);
}
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);
}
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);
}
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 + k] = str2[k];
for (l = 0; l < str3.Length; l++)
concat[i + j + k + l] = str3[l];
- concat[len] = '\0';
return new String (concat);
}
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);
}
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];
for (k = 0; k < value[j].Length; k++)
str[i++] = value[j][k];
}
- str[i] = '\0';
return new String (str);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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));
}
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));
}
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));
}
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];
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);
}
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;
}
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);
}
return null;
}
+ [CLSCompliant(false)]
public sbyte ToSByte (IFormatProvider provider)
{
// FIXME: implement me
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
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);
}
}
}
+ public abstract Module Module {get;}
+ public abstract string Namespace {get;}
+
public MethodInfo[] GetMethods ()
{
// FIXME
// 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;
+ }
+
}
}
using System.Globalization;
namespace System {
-
+
+ [CLSCompliant(false)]
public struct UInt16 : IComparable, IFormattable { //, IConvertible {
private static Type Type = typeof (ushort);
using System.Globalization;
namespace System {
-
+
+ [CLSCompliant(false)]
public struct UInt32 : IComparable, IFormattable { //, IConvertible {
public static Type Type = typeof (uint);
using System.Globalization;
namespace System {
-
+
+ [CLSCompliant(false)]
public struct UInt64 : IComparable, IFormattable { //, IConvertible {
private static Type Type = typeof (ulong);
[
StructLayout(LayoutKind.Auto),
- CLSCompliant(true)
+ CLSCompliant(false)
]
public unsafe struct UIntPtr : ISerializable
{
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
{
get
{
- return isTerminating;
+ return m_isTerminating;
}
}
}
namespace System.Private {
+[CLSCompliant(false)]
public struct stat {
public uint st_dev;
public uint st_mode;
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;
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;
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;
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)]
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)]