diff options
Diffstat (limited to 'ShiftOS.WinForms/HackerCommands.cs')
| -rw-r--r-- | ShiftOS.WinForms/HackerCommands.cs | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/ShiftOS.WinForms/HackerCommands.cs b/ShiftOS.WinForms/HackerCommands.cs index 316b7fc..dd8bde8 100644 --- a/ShiftOS.WinForms/HackerCommands.cs +++ b/ShiftOS.WinForms/HackerCommands.cs @@ -679,28 +679,13 @@ namespace ShiftOS.WinForms [Command("list", description ="Lists all story IDs.")] public static bool ListIds() { - foreach(var exec in System.IO.Directory.GetFiles(Environment.CurrentDirectory)) - { - if(exec.ToLower().EndsWith(".exe") || exec.ToLower().EndsWith(".dll")) + foreach(var type in ReflectMan.Types) + foreach(var method in type.GetMethods(BindingFlags.Public | BindingFlags.Static)) { - try - { - var asm = Assembly.LoadFile(exec); - { - foreach(var type in asm.GetTypes()) - { - foreach(var method in type.GetMethods(BindingFlags.Public | BindingFlags.Static)) - { - var attr = method.GetCustomAttributes(false).FirstOrDefault(x => x is StoryAttribute); - if (attr != null) - Console.WriteLine(" - " + (attr as StoryAttribute).StoryID); - } - } - } - } - catch { } + var attr = method.GetCustomAttributes(false).FirstOrDefault(x => x is StoryAttribute); + if (attr != null) + Console.WriteLine(" - " + (attr as StoryAttribute).StoryID); } - } return true; } |
