using System.Runtime.CompilerServices;
namespace System {
+
public interface AppDomain_Intf {
}
+
public sealed class AppDomain /* : MarshalByRefObject , _AppDomain, IEvidenceFactory */ {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern AppDomain getCurDomain ();
- public static AppDomain CurrentDomain {
- get { return getCurDomain ();}
+ public static AppDomain CurrentDomain
+ {
+ get {
+ return getCurDomain ();
+ }
}
- public AssemblyBuilder DefineDynamicAssembly( AssemblyName name, AssemblyBuilderAccess access) {
+
+ public AssemblyBuilder DefineDynamicAssembly (AssemblyName name,
+ AssemblyBuilderAccess access)
+ {
AssemblyBuilder ab = new AssemblyBuilder (name, access);
return ab;
}
-
}
}
//
// System.ApplicationException.cs
//
-// Author:
+// Authors:
// Joe Shaw (joe@ximian.com)
+// Miguel de Icaza (miguel@ximian.com)
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
//
+using System.Runtime.Serialization;
+using System.Reflection;
+
namespace System {
public class ApplicationException : Exception {
: base (message, inner)
{
}
+
+ protected ApplicationException (SerializationInfo info, StreamingContext context)
+ : base (info, context)
+ {
+ }
}
}
public int CompareTo (object v)
{
- if (!(v is System.Byte))
+ if (v == null || !(v is System.Byte))
throw new ArgumentException ("Value is not a System.Byte");
return value - ((byte) v);
+2001-11-14 Miguel de Icaza <miguel@ximian.com>
+
+ * Decimal.cs, Double.cs, Byte.cs, Char.cs, Int16, UInt16, Int32,
+ UInt32, Int64, UInt64, SByte, Single (CompareTo): Throw the
+ exception if the value is null too.
+
+ * Char.cs (CompareTo): ditto.
+
+ * ApplicationException.cs: Added constructor that does serialization.
+
+ * ParamArrayAttribute.cs: Define attribute correctly.
Wed Nov 14 16:31:19 CET 2001 Paolo Molaro <lupus@ximian.com>
public int CompareTo (object v)
{
- if (!(v is System.Char))
+ if (v == null || !(v is System.Char))
throw new ArgumentException ("Value is not a System.Char");
return value - ((char) v);
\r
public int CompareTo(object val)\r
{\r
- if (!(val is Decimal))\r
+ if (val == null || !(val is Decimal))\r
throw new ArgumentException ("Value is not a System.Decimal");\r
\r
Decimal d2 = (Decimal)val;\r
public int CompareTo (object v)
{
- if (!(v is System.Double))
+ if (v == null || !(v is System.Double))
throw new ArgumentException ("Value is not a System.Double");
return (int) (value - ((double) v));
public int CompareTo (object v)
{
- if (!(v is System.Int16))
+ if (v == null || !(v is System.Int16))
throw new ArgumentException ("Value is not a System.Int16");
return value - ((short) v);
public int CompareTo (object v)
{
- if (!(v is System.Int32))
+ if (v == null || !(v is System.Int32))
throw new ArgumentException ("Value is not a System.Int32");
return value - (int) v;
public int CompareTo (object v)
{
- if (!(v is System.Int64))
+ if (v == null || !(v is System.Int64))
throw new ArgumentException ("Value is not a System.Int64");
if (value == (long) v)
namespace System {
- public abstract class ParamArrayAttribute {
+ /// <summary>
+ /// Used to flag that the method will take a variable number
+ /// of arguments
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Parameter)]
+ public sealed class ParamArrayAttribute : Attribute {
public ParamArrayAttribute ()
{
public int CompareTo (object v)
{
- if (!(v is System.SByte))
+ if (v == null || !(v is System.SByte))
throw new ArgumentException ("Value is not a System.SByte");
return value - ((sbyte) v);
public int CompareTo (object v)
{
- if (!(v is System.Single))
+ if (v == null || !(v is System.Single))
throw new ArgumentException ("Value is not a System.Single");
return (int) (value - ((float) v));
public int CompareTo (object v)
{
- if (!(v is System.UInt16))
+ if (v == null || !(v is System.UInt16))
throw new ArgumentException ("Value is not a System.UInt16");
return value - ((ushort) v);
public int CompareTo (object v)
{
- if (!(v is System.UInt32))
+ if (v == null || !(v is System.UInt32))
throw new ArgumentException ("Value is not a System.UInt32");
if (value == (uint) v)
public int CompareTo (object v)
{
- if (!(v is System.UInt64))
+ if (v == null || !(v is System.UInt64))
throw new ArgumentException ("Value is not a System.UInt64");
if (value == (ulong) v)