mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-21 09:39:56 +00:00
use IsDefined instead of GetCustomAttribute
This commit is contained in:
parent
f31f603d64
commit
c49828c13c
@ -141,7 +141,7 @@ namespace QSB
|
||||
DebugLog.DebugWrite(assembly.ToString());
|
||||
assembly.GetTypes()
|
||||
.SelectMany(x => x.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.DeclaredOnly))
|
||||
.Where(x => x.GetCustomAttribute<RuntimeInitializeOnLoadMethodAttribute>() != null)
|
||||
.Where(x => x.IsDefined(typeof(RuntimeInitializeOnLoadMethodAttribute)))
|
||||
.ForEach(x => x.Invoke(null, null));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user