[Mono-list] Eliminating redundent methods in the class status page (they're
properties too!)
Duncan Mak
duncan@ximian.com
28 Feb 2002 11:58:40 -0500
--=-B5H3W37YVGo2aRyB07mM
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Nick,
I'm loving the new Class Status page and it has already helped me catch
quite a few bugs already this morning. I noticed a bit earlier that it's
listing properties twice because it's listed under as both a MethodInfo
*and* a PropertyInfo. A little bit of testing and playing around, and 5
minutes later, I got a patch that'll fix that.
The Reflection API is so much fun ;-)
Duncan.
--=-B5H3W37YVGo2aRyB07mM
Content-Disposition: attachment; filename=MissingMethod.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ISO-8859-1
Index: MissingMethod.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/mcs/tools/corcompare/MissingMethod.cs,v
retrieving revision 1.3
diff -u -5 -r1.3 MissingMethod.cs
--- MissingMethod.cs 2002/02/24 05:03:11 1.3
+++ MissingMethod.cs 2002/02/28 13:06:49
@@ -22,11 +22,14 @@
{=0D
// e.g. <method name=3D"Equals" status=3D"missing"/>=0D
MemberInfo mInfo;=0D
=20=0D
public MissingMethod(MemberInfo info) {=0D
- mInfo =3D info;=0D
+ if (mi.Name.StartsWith ("_get") || mi.Name.StartsWith ("_set"))=0D
+ return;=0D
+ else=0D
+ mInfo =3D info;=0D
}=0D
=20=0D
public string Name {=0D
get {=0D
string s =3D mInfo.ToString();=0D
--=-B5H3W37YVGo2aRyB07mM--