forked from icsharpcode/ILSpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDemo.ps1
30 lines (21 loc) · 944 Bytes
/
Demo.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$basePath = $PSScriptRoot
if ([string]::IsNullOrEmpty($basePath))
{
$basePath = Split-Path -parent $psISE.CurrentFile.Fullpath
}
$modulePath = $basePath + '\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.Powershell.dll'
Import-Module $modulePath
$version = Get-DecompilerVersion
Write-Output $version
# different test assemblies - it makes a difference wrt .deps.json so there are two netstandard tests here
$asm_netstdWithDepsJson = $basePath + '\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.Powershell.dll'
$asm_netstd = $basePath + '\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.dll'
$decompiler = Get-Decompiler $asm_netstdWithDepsJson
$classes = Get-DecompiledTypes $decompiler -Types class
$classes.Count
foreach ($c in $classes)
{
Write-Output $c.FullName
}
Get-DecompiledSource $decompiler -TypeName ICSharpCode.Decompiler.PowerShell.GetDecompilerCmdlet
Get-DecompiledProject $decompiler -OutputPath .\decomptest