I am able to see all the methods in a referenced library in my object browser. I wish to export all these methods to a text file.
I also have access to dotPeek but I could not locate any export functionality in that software.
I am able to see all the methods in a referenced library in my object browser. I wish to export all these methods to a text file.
I also have access to dotPeek but I could not locate any export functionality in that software.
You can use PowerShell to get a list of types/methods in a given assembly.
$AssemblyList = [System.AppDomain]::CurrentDomain.GetAssemblies();
foreach ($Type in $AssemblyList[5].GetTypes()) {
$MethodList = $Type.GetMethods();
foreach ($Method in $MethodList) {
$Type.Name + ' ' + $Method.Name;
}
}
You can also do a reflection-only load on a particular file path:
$Assembly = [System.Reflection.Assembly]::ReflectionOnlyLoadFrom('c:\path\to\assembly.dll');
foreach ($Type in $Assembly.GetTypes()) {
$MethodList = $Type.GetMethods();
foreach ($Method in $MethodList) {
$Type.Name + ' ' + $Method.Name;
}
}
I've got to admit I'm not sure how you could do it in Visual Studio, but programatically you can use reflection:
ETA:
I'm not 100% if you want the methods in the screenshot or all the methods in the DLL so I've updated with the second variant: