diff options
| author | Michael VanOverbeek <[email protected]> | 2017-06-11 11:57:31 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-06-11 11:57:31 +0000 |
| commit | 997a81457ebb6d6523c36ca552cee143e0d92244 (patch) | |
| tree | da98985ced112b6d238811f3ca770014d67e34fc /ShiftOS_TheReturn/NotificationDaemon.cs | |
| parent | 0d75f701778a0900a58343c4c80c124279bc231f (diff) | |
| parent | 107a98686a105468b5f200ebcbd27343c1210ce4 (diff) | |
| download | shiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.tar.gz shiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.tar.bz2 shiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.zip | |
Merge pull request #129 from RogueAI42/master
ReflectMan Saves The Day..............
Diffstat (limited to 'ShiftOS_TheReturn/NotificationDaemon.cs')
| -rw-r--r-- | ShiftOS_TheReturn/NotificationDaemon.cs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/ShiftOS_TheReturn/NotificationDaemon.cs b/ShiftOS_TheReturn/NotificationDaemon.cs index 0725782..a532466 100644 --- a/ShiftOS_TheReturn/NotificationDaemon.cs +++ b/ShiftOS_TheReturn/NotificationDaemon.cs @@ -41,26 +41,7 @@ namespace ShiftOS.Engine /// <returns>An array of <see cref="Type"/>s containing the found objects.</returns> public static Type[] GetAllStatusIcons() { - List<Type> lst = new List<Type>(); - foreach(var exec in System.IO.Directory.GetFiles(Environment.CurrentDirectory)) - { - if(exec.ToLower().EndsWith(".exe") || exec.ToLower().EndsWith(".dll")) - { - try - { - var asm = Assembly.LoadFile(exec); - foreach(var type in asm.GetTypes().Where(x => x.GetInterfaces().Contains(typeof(IStatusIcon)))) - { - if (Shiftorium.UpgradeAttributesUnlocked(type)) - { - lst.Add(type); - } - } - } - catch { } - } - } - return lst.ToArray(); + return Array.FindAll(ReflectMan.Types, x => x.GetInterfaces().Contains(typeof(IStatusIcon)) && Shiftorium.UpgradeAttributesUnlocked(x)); } |
