2005-03-15 John Luke <john.luke@gmail.com>
* glib/Object.cs: use IsDefined to check for ClassInitializer attribute, fixes a warning and is supposedly better for performance svn path=/trunk/gtk-sharp/; revision=41839
This commit is contained in:
parent
d33153086e
commit
b9831cc33e
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-03-15 John Luke <john.luke@gmail.com>
|
||||||
|
|
||||||
|
* glib/Object.cs: use IsDefined to check for ClassInitializer
|
||||||
|
attribute, fixes a warning and is supposedly better for performance
|
||||||
|
|
||||||
2005-03-15 Dan Winship <danw@novell.com>
|
2005-03-15 Dan Winship <danw@novell.com>
|
||||||
|
|
||||||
Re-fix for yesterday's fix that didn't actually work.
|
Re-fix for yesterday's fix that didn't actually work.
|
||||||
|
|
|
@ -142,7 +142,7 @@ namespace GLib {
|
||||||
object[] parms = {gtype, t};
|
object[] parms = {gtype, t};
|
||||||
BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy;
|
BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy;
|
||||||
foreach (MethodInfo minfo in t.GetMethods(flags))
|
foreach (MethodInfo minfo in t.GetMethods(flags))
|
||||||
foreach (object attr in minfo.GetCustomAttributes (typeof (ClassInitializerAttribute), true))
|
if (minfo.IsDefined (typeof (ClassInitializerAttribute), true))
|
||||||
minfo.Invoke (null, parms);
|
minfo.Invoke (null, parms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue