Author: zoltan
Date: 2005-06-07 09:41:59 -0400 (Tue, 07 Jun 2005)
New Revision: 45578
Modified:
trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
trunk/mcs/class/corlib/System.Reflection.Emit/EventToken.cs
trunk/mcs/class/corlib/System.Reflection.Emit/FieldToken.cs
trunk/mcs/class/corlib/System.Reflection.Emit/Label.cs
trunk/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
trunk/mcs/class/corlib/System.Reflection.Emit/OpCode.cs
trunk/mcs/class/corlib/System.Reflection.Emit/ParameterToken.cs
trunk/mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
trunk/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs
trunk/mcs/class/corlib/System.Reflection.Emit/StringToken.cs
trunk/mcs/class/corlib/System.Reflection.Emit/TypeToken.cs
Log:
2005-06-07 Zoltan Varga <[EMAIL PROTECTED]>
* *Token.cs: Add net 2.0 Equals methods.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
2005-06-07 13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilderAccess.cs
2005-06-07 13:41:59 UTC (rev 45578)
@@ -41,5 +41,9 @@
Run = 1,
Save = 2,
RunAndSave = 3
+#if NET_2_0
+ ,
+ ReflectionOnly = 6
+#endif
}
}
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-06-07
13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ChangeLog 2005-06-07
13:41:59 UTC (rev 45578)
@@ -1,5 +1,7 @@
2005-06-07 Zoltan Varga <[EMAIL PROTECTED]>
+ * *Token.cs: Add net 2.0 Equals methods.
+
* *.cs: Updates for net 2.0 beta 2.
* *.cs: Updates for net 2.0 beta 2.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/EventToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/EventToken.cs 2005-06-07
13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/EventToken.cs 2005-06-07
13:41:59 UTC (rev 45578)
@@ -71,6 +71,12 @@
return res;
}
+#if NET_2_0
+ public bool Equals (EventToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
/// <summary>
/// Tests whether the given object is an instance of
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/FieldToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/FieldToken.cs 2005-06-07
13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/FieldToken.cs 2005-06-07
13:41:59 UTC (rev 45578)
@@ -55,8 +55,6 @@
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
@@ -72,6 +70,13 @@
}
+#if NET_2_0
+ public bool Equals (FieldToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
+
/// <summary>
/// Tests whether the given object is an instance of
/// FieldToken and has the same token value.
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/Label.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/Label.cs 2005-06-07
13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/Label.cs 2005-06-07
13:41:59 UTC (rev 45578)
@@ -51,6 +51,15 @@
return false;
}
+#if NET_2_0
+ [MonoTODO]
+ public bool Equals (Label obj)
+ {
+ /* FIXME: */
+ return false;
+ }
+#endif
+
public override int GetHashCode () {
return label.GetHashCode ();
}
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
2005-06-07 13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
2005-06-07 13:41:59 UTC (rev 45578)
@@ -55,8 +55,6 @@
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
@@ -71,6 +69,12 @@
return res;
}
+#if NET_2_0
+ public bool Equals (MethodToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
/// <summary>
/// Tests whether the given object is an instance of
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/OpCode.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/OpCode.cs 2005-06-07
13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/OpCode.cs 2005-06-07
13:41:59 UTC (rev 45578)
@@ -76,6 +76,13 @@
return v.op1 == op1 && v.op2 == op2;
}
+#if NET_2_0
+ public bool Equals (OpCode obj)
+ {
+ return obj.op1 == op1 && obj.op2 == op2;
+ }
+#endif
+
public override string ToString ()
{
return Name;
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/ParameterToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/ParameterToken.cs
2005-06-07 13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/ParameterToken.cs
2005-06-07 13:41:59 UTC (rev 45578)
@@ -55,8 +55,6 @@
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
@@ -71,6 +69,12 @@
return res;
}
+#if NET_2_0
+ public bool Equals (ParameterToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
/// <summary>
/// Tests whether the given object is an instance of
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
2005-06-07 13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
2005-06-07 13:41:59 UTC (rev 45578)
@@ -55,8 +55,6 @@
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
@@ -71,6 +69,12 @@
return res;
}
+#if NET_2_0
+ public bool Equals (PropertyToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
/// <summary>
/// Tests whether the given object is an instance of
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs
2005-06-07 13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/SignatureToken.cs
2005-06-07 13:41:59 UTC (rev 45578)
@@ -55,8 +55,6 @@
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
@@ -71,6 +69,12 @@
return res;
}
+#if NET_2_0
+ public bool Equals (SignatureToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
/// <summary>
/// Tests whether the given object is an instance of
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/StringToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/StringToken.cs
2005-06-07 13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/StringToken.cs
2005-06-07 13:41:59 UTC (rev 45578)
@@ -51,8 +51,6 @@
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
@@ -67,6 +65,12 @@
return res;
}
+#if NET_2_0
+ public bool Equals (StringToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
/// <summary>
/// Tests whether the given object is an instance of
Modified: trunk/mcs/class/corlib/System.Reflection.Emit/TypeToken.cs
===================================================================
--- trunk/mcs/class/corlib/System.Reflection.Emit/TypeToken.cs 2005-06-07
13:34:27 UTC (rev 45577)
+++ trunk/mcs/class/corlib/System.Reflection.Emit/TypeToken.cs 2005-06-07
13:41:59 UTC (rev 45578)
@@ -55,8 +55,6 @@
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
@@ -71,6 +69,12 @@
return res;
}
+#if NET_2_0
+ public bool Equals (TypeToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+#endif
/// <summary>
/// Tests whether the given object is an instance of
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches