Browse Source

Added stub classes/methods needed by compiler in an attempt to get it
to run in Linux.

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

Sean MacIsaac 24 years ago
parent
commit
fc1bf781fa

+ 12 - 0
mcs/class/corlib/System.Globalization/CultureInfo.cs

@@ -0,0 +1,12 @@
+// System.Globalization.CultureInfo
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) Ximian, Inc. 2001
+
+namespace System.Globalization
+{
+	public class CultureInfo
+	{
+	}
+}

+ 7 - 0
mcs/class/corlib/System.IO/FileLoadException.cs

@@ -25,5 +25,12 @@ namespace System.IO {
 			: base (message, inner)
 		{
 		}
+
+		public string FusionLog {
+			get {
+				// FIXME
+				return null;
+			}
+		}
 	}
 }

+ 7 - 0
mcs/class/corlib/System.IO/FileNotFoundException.cs

@@ -25,5 +25,12 @@ namespace System.IO {
 			: base (message, inner)
 		{
 		}
+
+		public string FusionLog {
+			get {
+				// FIXME
+				return null;
+			}
+		}
 	}
 }

+ 5 - 0
mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs

@@ -164,5 +164,10 @@ namespace System.Reflection.Emit {
 			entry_point = entryMethod;
 		}
 
+		public void SetEntryPoint (MethodInfo entryMethod, PEFileKinds fileKind)
+		{
+			entry_point = entryMethod;
+		}
+
 	}
 }

+ 3 - 0
mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs

@@ -56,5 +56,8 @@ namespace System.Reflection.Emit {
 			return null;
 		}
 
+		public override Type GetElementType () { return null; }
+
+		public override Type[] GetInterfaces () { return null; }
 	}
 }

+ 1 - 1
mcs/class/corlib/System.Reflection/Assembly.cs

@@ -16,7 +16,7 @@ using System.Globalization;
 
 namespace System.Reflection {
 
-	public class Assembly : System.Object, System.Reflection.ICustomAttributeProvider,
+	public class Assembly : System.Reflection.ICustomAttributeProvider,
 		System.Security.IEvidenceFactory, System.Runtime.Serialization.ISerializable {
 
 		private string codebase;

+ 12 - 0
mcs/class/corlib/System.Reflection/Binder.cs

@@ -0,0 +1,12 @@
+// System.Reflection.Binder
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) Ximian, Inc. 2001
+
+namespace System.Reflection
+{
+	public abstract class Binder
+	{
+	}
+}

+ 10 - 0
mcs/class/corlib/System.Reflection/FieldInfo.cs

@@ -12,5 +12,15 @@
 namespace System.Reflection {
 
 	public abstract class FieldInfo : MemberInfo {
+
+		public abstract Type FieldType { get; }
+
+		public abstract object GetValue(object obj);
+
+		// FIXME
+		public bool IsLiteral { get { return true; } } 
+
+		// FIXME
+		public bool IsStatic { get { return false; } }
 	}
 }

+ 12 - 0
mcs/class/corlib/System.Reflection/ManifestResourceInfo.cs

@@ -0,0 +1,12 @@
+// System.Reflection.ManifestResourceInfo
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) Ximian, Inc. 2001
+
+namespace System.Reflection
+{
+	public class ManifestResourceInfo
+	{
+	}
+}

+ 23 - 0
mcs/class/corlib/System.Reflection/ParameterInfo.cs

@@ -0,0 +1,23 @@
+// System.Reflection.ParameterInfo
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) 2001 Ximian, Inc.
+
+namespace System.Reflection
+{
+	public class ParameterInfo
+	{
+		public virtual object[] GetCustomAttributes (bool inherit)
+		{
+			// FIXME
+			return null;
+		}
+
+		public virtual object[] GetCustomAttributes (Type attributeType, bool inherit)
+		{
+			// FIXME
+			return null;
+		}
+	}
+}

+ 13 - 0
mcs/class/corlib/System.Reflection/TypeFilter.cs

@@ -0,0 +1,13 @@
+// TypeAttributes.cs
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) 2001 Ximian, Inc.  http://www.ximian.com
+
+
+namespace System.Reflection {
+
+
+	public delegate bool TypeFilter (Type m, object filterCriteria);
+
+} // System.Reflection

+ 15 - 0
mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs

@@ -0,0 +1,15 @@
+// System.Runtime.CompilerServices.RuntimeHelpers
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) Ximian, Inc. 2001
+
+namespace System.Runtime.CompilerServices
+{
+	public sealed class RuntimeHelpers
+	{
+		public static void InitializeArray (Array array, RuntimeFieldHandle fldHandle)
+		{
+		}
+	}
+}

+ 12 - 0
mcs/class/corlib/System.Security.Policy/Evidence.cs

@@ -0,0 +1,12 @@
+// System.Security.Policy.Evidence
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) 2001 Ximian, Inc.
+
+namespace System.Security.Policy
+{
+	public sealed class Evidence
+	{
+	}
+}

+ 12 - 0
mcs/class/corlib/System.Security/IEvidenceFactory.cs

@@ -0,0 +1,12 @@
+// System.Security.IEvidenceFactory
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) Ximian, Inc. 2001
+
+namespace System.Security
+{
+	public interface IEvidenceFactory
+	{
+	}
+}

+ 4 - 0
mcs/class/corlib/System.Text/StringBuilder.cs

@@ -373,6 +373,10 @@ namespace System.Text {
 			return Append( value.ToString().ToCharArray() );
 		}
 
+		public StringBuilder Append( char value ) {
+			return Append (value, 1);
+		}
+
 		public StringBuilder Append( char value, int repeatCount ) {
 			if( repeatCount < 0 ) {
 				throw new ArgumentOutOfRangeException();

+ 3 - 0
mcs/class/corlib/System/Array.cs

@@ -506,5 +506,8 @@ namespace System
 				return comparer.Compare(value1, value2);
 		}
 	
+		public virtual void CopyTo (Array array, int index)
+		{
+		}
 	}
 }

+ 18 - 0
mcs/class/corlib/System/BadImageFormatException.cs

@@ -0,0 +1,18 @@
+// System.BadImageFormatException
+//
+// Sean MacIsaac ([email protected])
+//
+// (C) 2001 Ximian, Inc.
+
+namespace System
+{
+	public class BadImageFormatException : Exception
+	{
+		public string FusionLog {
+			get {
+				// FIXME
+				return null;
+			}
+		}
+	}
+}

+ 10 - 0
mcs/class/corlib/System/ResolveEventHandler.cs

@@ -0,0 +1,10 @@
+// System.ResolveEventHandler
+//
+// Sean MacIsaac
+//
+// (C) 2001 Ximian, Inc.
+
+namespace System
+{
+	public delegate Reflection.Assembly ResolveEventHandler (object sender, ResolveEventArgs args);
+}

+ 62 - 0
mcs/class/corlib/System/Type.cs

@@ -115,6 +115,68 @@ namespace System {
 				return(false);
 			}
 		}
+
+		public bool IsClass {
+			get {
+				// FIXME
+				return true;
+			}
+		}
+
+		public bool IsInterface {
+			get {
+				// FIXME
+				return false;
+			}
+		}
+
+		public bool IsArray {
+			get {
+				// FIXME
+				return false;
+			}
+		}
+
+		public bool IsSubclassOf (Type c)
+		{
+			// FIXME
+			return false;
+		}
+
+		public virtual Type[] FindInterfaces (TypeFilter filter, object filterCriteria)
+		{
+			// FIXME
+			return null;
+		}
+
+		public abstract Type[] GetInterfaces ();
 		
+		public virtual bool IsAssignableFrom (Type c)
+		{
+			// FIXME
+			return false;
+		}
+
+		public virtual int GetArrayRank ()
+		{
+			// FIXME
+			return 0;
+		}
+
+		public abstract Type GetElementType ();
+
+		public bool IsSealed {
+			get {
+				// FIXME
+				return false;
+			}
+		}
+
+		public bool IsAbstract {
+			get {
+				// FIXME
+				return false;
+			}
+		}
 	}
 }