Last active
April 27, 2017 23:33
-
-
Save the-nose-knows/02ef408011584f7e2b86f65f45e18e5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using System.IO; | |
namespace DotNetInspectorGadget | |
{ | |
class DotNetInspectorGadget | |
{ | |
static int Main(string[] args) | |
{ | |
if(args.GetLength(0) < 1) | |
{ | |
Console.WriteLine("Add a single parameter that is your" + | |
" path to the file you want inspected."); | |
return 1; | |
} | |
try { | |
var assemblies = Assembly.LoadFile(@args[0]).GetReferencedAssemblies(); | |
if (assemblies.GetLength(0) > 0) | |
{ | |
foreach (var assembly in assemblies) | |
{ | |
Console.WriteLine(assembly); | |
} | |
return 0; | |
} | |
} | |
catch(Exception e) { | |
Console.WriteLine("An exception occurred: {0}", e.Message); | |
return 1; | |
} finally{} | |
return 1; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment