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
$userPath = $env:USERPROFILE | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
$pathExclusions.Add('C:\Windows\assembly') > $null | |
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null | |
$pathExclusions.Add($userPath + '\.dotnet') > $null |
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
var compilation = CSharpCompilation.Create("C") | |
.AddReferences(MetadataReference.CreateFromFile(pathToAssembly)); | |
foreach (var type in | |
from assemblySymbol in compilation.SourceModule.ReferencedAssemblySymbols | |
from module in assemblySymbol.Modules | |
from n in module.GlobalNamespace.GetMembers() | |
where n.IsNamespace | |
from type in n.GetTypeMembers() | |
select type) |